mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
Add WeaponJammedMessage test
This commit is contained in:
parent
b0acc44373
commit
0212272a2a
|
|
@ -776,6 +776,26 @@ class GamePacketTest extends Specification {
|
|||
}
|
||||
}
|
||||
|
||||
"WeaponJammedMessage" should {
|
||||
val string = hex"66 4C00"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string).require match {
|
||||
case WeaponJammedMessage(weapon_guid) =>
|
||||
weapon_guid mustEqual PlanetSideGUID(76)
|
||||
case default =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = WeaponJammedMessage(PlanetSideGUID(76))
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string
|
||||
}
|
||||
}
|
||||
|
||||
"PingMsg" should {
|
||||
val packet = hex"1a 00000000 b0360000"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue