added GenericActionMessage packet and tests; action 29 and action 30 were discovered by SouNourS

This commit is contained in:
FateJH 2017-03-01 22:24:54 -05:00
parent b6cf5aa580
commit 0e926e87e6
3 changed files with 75 additions and 1 deletions

View file

@ -1426,6 +1426,26 @@ class GamePacketTest extends Specification {
}
}
"GenericActionMessage" should {
val string = hex"A7 94"
"decode" in {
PacketCoding.DecodePacket(string).require match {
case GenericActionMessage(action) =>
action mustEqual 37
case default =>
ko
}
}
"encode" in {
val msg = GenericActionMessage(37)
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}
"ContinentalLockUpdateMessage" should {
val string = hex"A8 16 00 40"