mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-11 14:34:40 +00:00
Add WeaponJammedMessage test
This commit is contained in:
parent
b0acc44373
commit
0212272a2a
1 changed files with 20 additions and 0 deletions
|
|
@ -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 {
|
"PingMsg" should {
|
||||||
val packet = hex"1a 00000000 b0360000"
|
val packet = hex"1a 00000000 b0360000"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue