Outgoing Packet Tests (Pass #1) (#129)

This commit is contained in:
Kamron Batman 2020-05-04 01:34:51 -07:00 • committed by GitHub
parent 11227391d3
commit d9f417ee19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 1084 additions and 381 deletions

View file

@ -0,0 +1,32 @@
using System;
using Server.Network;
using Xunit;
namespace Server.Tests.Network.Packets
{
public class MapPatchesTests : IClassFixture<ServerFixture>
{
[Fact]
public void TestMapPatches()
{
Span<byte> data = new MapPatches().Compile();
Span<byte> expectedData = stackalloc byte[] {
0xBF, // Packet
0x00, 0x29, // Length
0x00, 0x18, // Sub-packet
0x00, 0x00, 0x00, 0x04, // 4 maps
0x00, 0x00, 0x00, 0x00, // Felucca
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, // Trammel
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, // Ilshenar
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, // Malas
0x00, 0x00, 0x00, 0x00
};
AssertThat.Equal(data, expectedData);
}
}
}