comments and tests

This commit is contained in:
FateJH 2017-01-28 01:05:40 -05:00
parent 91a429506f
commit a3d8d891a1
2 changed files with 41 additions and 3 deletions

View file

@ -1325,6 +1325,29 @@ class GamePacketTest extends Specification {
}
}
"PlayerStasisMessage" should {
val string = hex"8A 4B 00 80"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case PlayerStasisMessage(player_guid, stasis) =>
player_guid mustEqual PlanetSideGUID(75)
stasis mustEqual true
case default =>
ko
}
}
"encode" in {
"encode" in {
val msg = PlayerStasisMessage(PlanetSideGUID(75))
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
}
"ContinentalLockUpdateMessage" should {
val string = hex"A8 16 00 40"