From 9767852da265b64f332d2691b7c7b864f024919f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Fri, 21 Jan 2022 13:35:17 +0100 Subject: [PATCH] fix(tests): test null values correctly --- .../Packets/InPacketConverterTests.cs | 18 +++++++++--------- .../Packets/PinitPacketConverterTest.cs | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs b/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs index 66ff5cf..d50e041 100644 --- a/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs +++ b/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs @@ -65,21 +65,21 @@ public class InPacketConverterTests PlayerClass.Archer, new InEquipmentSubPacket ( - -1, + null, 4480, 4452, 4468, 4840, 4132, - -1, - -1, - -1, - -1 + null, + null, + null, + null ), 50, 95, false, - -1, + null, 4, Element.Dark, 0, @@ -213,10 +213,10 @@ public class InPacketConverterTests 0, 0, 0, - -1, + null, SpawnEffect.NoEffect, false, - -1, + null, null, "0", null, @@ -285,7 +285,7 @@ public class InPacketConverterTests var result = _packetSerializer.Serialize(actualPacket); Assert.True(result.IsSuccess); var expectedPacketString - = "in 2 334 1992 134 112 2 100 80 0 0 0 -1 1 0 -1 - 0 -1 0 0 0 0 0 0 0 0 0 0"; + = "in 2 334 1992 134 112 2 100 80 0 0 0 -1 1 0 -1 - 0 - 0 0 0 0 0 0 0 0 0 0"; Assert.Equal(expectedPacketString, result.Entity); } } \ No newline at end of file diff --git a/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs b/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs index 28f53f3..e822ad4 100644 --- a/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs +++ b/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs @@ -64,7 +64,7 @@ public class PinitPacketConverterTest Assert.Equal(2, actualPacket.GroupSize); Assert.NotNull(actualPacket.PinitSubPackets); Assert.Equal(2, actualPacket.PinitSubPackets!.Count); - Assert.StrictEqual(new PinitSubPacket(EntityType.Npc, 345377, 0, 83, "Kliff", -1, 319, 1, 0, null, null, null), actualPacket.PinitSubPackets[0]); - Assert.StrictEqual(new PinitSubPacket(EntityType.Npc, 345384, 1, 83, "@", -1, 2105, 0, 0, null, null, null), actualPacket.PinitSubPackets[1]); + Assert.StrictEqual(new PinitSubPacket(EntityType.Npc, 345377, 0, 83, "Kliff", null, 319, 1, 0, null, null, null), actualPacket.PinitSubPackets[0]); + Assert.StrictEqual(new PinitSubPacket(EntityType.Npc, 345384, 1, 83, "@", null, 2105, 0, 0, null, null, null), actualPacket.PinitSubPackets[1]); } } \ No newline at end of file -- 2.49.0