Skip to content

Commit

Permalink
update to nunit 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LeftofZen committed Feb 9, 2024
1 parent 0f78cbd commit 72c03b3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Tests/LoadSaveTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void LoadSaveGenericTest<T>(string objectName, Action<ILocoObject, T> ass
{
Assert.That(bytes2S5Header, Is.EqualTo(bytes1S5Header));
Assert.That(bytes2ObjHeader, Is.EqualTo(bytes1ObjHeader));
CollectionAssert.AreEqual(bytes1ObjArr.ToArray(), bytes2ObjArr.ToArray());
Assert.That(bytes1ObjArr.ToArray(), Is.EquivalentTo(bytes2ObjArr.ToArray()));
});
}

Expand Down Expand Up @@ -250,7 +250,7 @@ void assertFunc(ILocoObject obj, CompetitorObject struc) => Assert.Multiple(() =
Assert.That(struc.var_04, Is.EqualTo(6672), nameof(struc.var_04));
Assert.That(struc.var_08, Is.EqualTo(2053), nameof(struc.var_08));
Assert.That(struc.Emotions, Is.EqualTo(255), nameof(struc.Emotions));
CollectionAssert.AreEqual(struc.Images, Array.CreateInstance(typeof(byte), 9), nameof(struc.Images));
Assert.That(struc.Images, Is.EquivalentTo(Array.CreateInstance(typeof(byte), 9)), nameof(struc.Images));
Assert.That(struc.Intelligence, Is.EqualTo(7), nameof(struc.Intelligence));
Assert.That(struc.Aggressiveness, Is.EqualTo(5), nameof(struc.Aggressiveness));
Assert.That(struc.Competitiveness, Is.EqualTo(6), nameof(struc.Competitiveness));
Expand Down Expand Up @@ -304,7 +304,7 @@ void assertFunc(ILocoObject obj, HillShapesObject struc) => Assert.Multiple(() =
Assert.That(struc.HillHeightMapCount, Is.EqualTo(2), nameof(struc.HillHeightMapCount));
Assert.That(struc.MountainHeightMapCount, Is.EqualTo(2), nameof(struc.MountainHeightMapCount));
//Assert.That(struc.var_08, Is.EqualTo(0), nameof(struc.var_08));
CollectionAssert.AreEqual(struc.pad_0C, Array.CreateInstance(typeof(byte), 2), nameof(struc.pad_0C));
Assert.That(struc.pad_0C, Is.EquivalentTo(Array.CreateInstance(typeof(byte), 2)), nameof(struc.pad_0C));
});
LoadSaveGenericTest<HillShapesObject>(objectName, assertFunc);
}
Expand Down Expand Up @@ -433,10 +433,10 @@ public void RegionObject(string objectName)
{
void assertFunc(ILocoObject obj, RegionObject struc) => Assert.Multiple(() =>
{
CollectionAssert.AreEqual(struc.pad_06, Array.CreateInstance(typeof(byte), 2), nameof(struc.pad_06));
Assert.That(struc.pad_06, Is.EquivalentTo(Array.CreateInstance(typeof(byte), 2)), nameof(struc.pad_06));
Assert.That(struc.RequiredObjectCount, Is.EqualTo(1), nameof(struc.RequiredObjectCount));
//CollectionAssert.AreEqual(struc.requiredObjects, Array.CreateInstance(typeof(byte), 4), nameof(struc.requiredObjects));
CollectionAssert.AreEqual(struc.pad_0D, Array.CreateInstance(typeof(byte), 5), nameof(struc.pad_0D));
Assert.That(struc.pad_0D, Is.EquivalentTo(Array.CreateInstance(typeof(byte), 5)), nameof(struc.pad_0D));
});
LoadSaveGenericTest<RegionObject>(objectName, assertFunc);
}
Expand Down Expand Up @@ -759,8 +759,8 @@ void assertFunc(ILocoObject obj, TreeObject struc) => Assert.Multiple(() =>
Assert.That(struc.NumRotations, Is.EqualTo(1), nameof(struc.NumRotations));
Assert.That(struc.Growth, Is.EqualTo(4), nameof(struc.Growth));
Assert.That(struc.Flags, Is.EqualTo(TreeObjectFlags.HighAltitude | TreeObjectFlags.RequiresWater | TreeObjectFlags.HasShadow), nameof(struc.Flags));
CollectionAssert.AreEqual(struc.Sprites, Array.CreateInstance(typeof(byte), 6), nameof(struc.Sprites));
CollectionAssert.AreEqual(struc.SnowSprites, Array.CreateInstance(typeof(byte), 6), nameof(struc.SnowSprites));
Assert.That(struc.Sprites, Is.EquivalentTo(Array.CreateInstance(typeof(byte), 6)), nameof(struc.Sprites));
Assert.That(struc.SnowSprites, Is.EquivalentTo(Array.CreateInstance(typeof(byte), 6)), nameof(struc.SnowSprites));
Assert.That(struc.ShadowImageOffset, Is.EqualTo(0), nameof(struc.ShadowImageOffset));
Assert.That(struc.var_3C, Is.EqualTo(15), nameof(struc.var_3C));
Assert.That(struc.SeasonState, Is.EqualTo(3), nameof(struc.SeasonState));
Expand Down

0 comments on commit 72c03b3

Please sign in to comment.