fix test namings, make Client.Common internals visible to tests, add a Bk2LogGenerator tests (more to come)
This commit is contained in:
parent
1bfaaab872
commit
0b5047b64a
|
@ -51,7 +51,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.WinForms.Controls",
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{74391239-9BC1-40CE-A3D7-180737C5302A}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{74391239-9BC1-40CE-A3D7-180737C5302A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Common.Tests", "src\BizHawk.Tests\BizHawk.Common.Tests.csproj", "{284E19E2-661D-4A7D-864A-AC2FC91E7C25}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BizHawk.Tests", "src\BizHawk.Tests\BizHawk.Tests.csproj", "{284E19E2-661D-4A7D-864A-AC2FC91E7C25}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
|
@ -19,3 +20,5 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
[assembly: Guid("8281b376-a1d5-4157-97b8-dab7246ef4c8")]
|
[assembly: Guid("8281b376-a1d5-4157-97b8-dab7246ef4c8")]
|
||||||
|
|
||||||
|
[assembly: InternalsVisibleTo("BizHawk.Tests")]
|
|
@ -0,0 +1,29 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using BizHawk.Client.Common;
|
||||||
|
using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
|
namespace BizHawk.Common.Tests.Client.Common.Movie
|
||||||
|
{
|
||||||
|
[TestClass]
|
||||||
|
public class LogGeneratorTests
|
||||||
|
{
|
||||||
|
[TestMethod]
|
||||||
|
public void GenerateLogEntry_ExclamationForUnknownButtons()
|
||||||
|
{
|
||||||
|
var controller = new SimpleController
|
||||||
|
{
|
||||||
|
Definition = new ControllerDefinition
|
||||||
|
{
|
||||||
|
BoolButtons = new List<string> {"Unknown Button"}
|
||||||
|
},
|
||||||
|
["Unknown Button"] = true
|
||||||
|
};
|
||||||
|
|
||||||
|
var lg = new Bk2LogEntryGenerator("NES", controller);
|
||||||
|
var actual = lg.GenerateLogEntry();
|
||||||
|
Assert.IsNotNull(lg);
|
||||||
|
Assert.AreEqual("|!|", actual);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue