fix: Fixes flaky tests, formatting, and sequential testing. (#2168)

This commit is contained in:
Kamron Batman 2025-04-30 16:42:38 -07:00 • committed by GitHub
parent 415c7a6bfd
commit 7dbfc9d161
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 1304 additions and 1289 deletions

View file

@ -13,12 +13,12 @@ public class CharacterStatuePacketTests
[InlineData(0x1024u, 1, 100, 200)]
public void TestSendStatueAnimation(uint s, int status, int anim, int frame)
{
var expected = new UpdateStatueAnimation((Serial)s, status, anim, frame).Compile();
var expected = new UpdateStatueAnimation((Serial)s, status, anim, frame).Compile();
var ns = PacketTestUtilities.CreateTestNetState();
ns.SendStatueAnimation((Serial)s, status, anim, frame);
var ns = PacketTestUtilities.CreateTestNetState();
ns.SendStatueAnimation((Serial)s, status, anim, frame);
var result = ns.SendPipe.Reader.AvailableToRead();
AssertThat.Equal(result, expected);
}
}
}
}

View file

@ -4,16 +4,16 @@ public class UpdateStatueAnimation : Packet
{
public UpdateStatueAnimation(Serial serial, int status, int animation, int frame) : base(0xBF, 17)
{
Stream.Write((short)0x11);
Stream.Write((short)0x19);
Stream.Write((byte)0x5);
Stream.Write(serial);
Stream.Write((byte)0);
Stream.Write((byte)0xFF);
Stream.Write((byte)status);
Stream.Write((byte)0);
Stream.Write((byte)animation);
Stream.Write((byte)0);
Stream.Write((byte)frame);
}
}
Stream.Write((short)0x11);
Stream.Write((short)0x19);
Stream.Write((byte)0x5);
Stream.Write(serial);
Stream.Write((byte)0);
Stream.Write((byte)0xFF);
Stream.Write((byte)status);
Stream.Write((byte)0);
Stream.Write((byte)animation);
Stream.Write((byte)0);
Stream.Write((byte)frame);
}
}