Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
binary1230 committed Jan 21, 2024
1 parent 96f29c4 commit 769c677
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .run/DiztinGUIsh - WinForms Desktop (Main App).run.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="DiztinGUIsh - WinForms Desktop (Main App)" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/DiztinGUIsh/bin/Debug/net6.0-windows7.0/DiztinGUIsh.exe" />
<option name="EXE_PATH" value="$PROJECT_DIR$/DiztinGUIsh/bin/Release/net6.0-windows7.0/DiztinGUIsh.exe" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/DiztinGUIsh/bin/Debug/net6.0-windows7.0" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/DiztinGUIsh/bin/Release/net6.0-windows7.0" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
Expand Down
2 changes: 1 addition & 1 deletion Diz.Test/Tests/RomInterfaceTests/AccessTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private static Data GetSampleData()
new() { Rom = 0x16, TypeFlag = FlagType.Operand },
new() { Rom = 0x21, TypeFlag = FlagType.Operand },
},
Comments = new ObservableDictionary<int, string>
Comments = new SortedDictionary<int, string>
{
{ 0xC00001, "unused" },
}
Expand Down
1 change: 0 additions & 1 deletion Diz.Test/Tests/RomModeDetectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class RomModeDetectionTests : ContainerFixture
{
[Inject] private readonly IReadFromFileBytes fileReader = null!;
[Inject] private readonly ISampleRomTestData sampleDataFixture = null!;
[Inject] private readonly ISnesRomAnalyzer snesRomAnalyzer = null!;

protected override void Configure(IServiceRegistry serviceRegistry)
{
Expand Down
2 changes: 1 addition & 1 deletion Diz.Test/Utils/TestUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class SampleRomTestDataFixture : ContainerFixture, ISampleRomTestData
{
public byte[] SampleRomBytes => sampleBytes.Value;

[Inject] private readonly ISnesSampleProjectFactory? sampleFactory = null!;
[Inject] private readonly ISnesSampleProjectFactory sampleFactory = null!;
private readonly Lazy<byte[]> sampleBytes;
public SampleRomTestDataFixture()
{
Expand Down
12 changes: 9 additions & 3 deletions Diz.Test/bugs/Bug050_JapaneseText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using LightInject;
using Moq;
using Xunit;
using IFileByteProvider = Diz.Core.serialization.IFileByteProvider;

namespace Diz.Test.bugs;

Expand Down Expand Up @@ -45,11 +46,11 @@ protected override byte[] SerializeWith(Project project, IProjectSerializer seri
public Bug50ProjectFileManager(
Func<IProjectXmlSerializer> projectXmlSerializerCreate,
Func<IAddRomDataCommand> addRomDataCommandCreate,
IFileByteProvider fileByteIo)
Func<string, IFileByteProvider> fileByteProviderFactory)
: base(
projectXmlSerializerCreate,
addRomDataCommandCreate,
fileByteIo)
fileByteProviderFactory)
{
}
}
Expand Down Expand Up @@ -91,7 +92,12 @@ public Bug050Fixture(
base(injectFieldsOnlyIfNull: true, injectOnlyTaggedFields: true)
{
FileIo = new FileIoFixture();
ProjectFileManager = new Bug50ProjectFileManager(fnProjectSerializerCreate, fnAddRomDataCommand, FileIo.Mock.Object);

ProjectFileManager = new Bug50ProjectFileManager(
fnProjectSerializerCreate,
fnAddRomDataCommand,
_ => FileIo.Mock.Object
);

ExpectedCartTitleValidationException = expectedCartTitleValidationException;
SaveVersionToUse = forceOlderVersion100 ? 100 : 101;
Expand Down

0 comments on commit 769c677

Please sign in to comment.