mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-02-12 19:31:07 +00:00
* Move /common/src to /src * Move services to net.psforever package * Move /pslogin to /server
27 lines
568 B
Scala
27 lines
568 B
Scala
// Copyright (c) 2017 PSForever
|
|
package game
|
|
|
|
import org.specs2.mutable._
|
|
import net.psforever.packet._
|
|
import net.psforever.packet.game._
|
|
import scodec.bits._
|
|
|
|
class AvatarJumpMessageTest extends Specification {
|
|
val string = hex"35 80"
|
|
|
|
"decode" in {
|
|
PacketCoding.DecodePacket(string).require match {
|
|
case AvatarJumpMessage(state) =>
|
|
state mustEqual true
|
|
case _ =>
|
|
ko
|
|
}
|
|
}
|
|
|
|
"encode" in {
|
|
val msg = AvatarJumpMessage(true)
|
|
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
|
|
|
pkt mustEqual string
|
|
}
|
|
}
|