Creates more tests for outgoing packets (#165)

This commit is contained in:
Kamron Batman 2020-06-26 12:04:29 -07:00 • committed by GitHub
parent d76d60d900
commit 24b1a579f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 2321 additions and 1488 deletions

View file

@ -13,7 +13,7 @@ namespace Server.Tests.Network.Packets
Span<byte> expectedData = stackalloc byte[]
{
0xBF, // Packet
0xBF, // Packet ID
0x00, 0x29, // Length
0x00, 0x18, // Sub-packet
0x00, 0x00, 0x00, 0x04, // 4 maps
@ -42,5 +42,21 @@ namespace Server.Tests.Network.Packets
AssertThat.Equal(data, expectedData);
}
[Fact]
public void TestMapChange()
{
Span<byte> data = new MapChange(Map.Felucca).Compile();
Span<byte> expectedData = stackalloc byte[]
{
0xBF, // Packet ID
0x00, 0x06, // Length
0x00, 0x08, // Sub-packet
0x00, // Felucca
};
AssertThat.Equal(data, expectedData);
}
}
}