fix: Fixes flaky tests, formatting, and sequential testing. (#2168)
This commit is contained in:
parent
415c7a6bfd
commit
7dbfc9d161
60 changed files with 1304 additions and 1289 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue