initial work on BeginZoningMessage; working tests (not like there's anything to test in the tests)

This commit is contained in:
FateJH 2017-04-21 00:24:44 -04:00
parent 68473dda45
commit 9f783572cd
4 changed files with 50 additions and 1 deletions

View file

@ -0,0 +1,27 @@
// Copyright (c) 2017 PSForever
package game
import org.specs2.mutable._
import net.psforever.packet._
import net.psforever.packet.game._
import scodec.bits._
class BeginZoningMessageTest extends Specification {
val string = hex"43" //yes, just the opcode
"decode" in {
PacketCoding.DecodePacket(string).require match {
case BeginZoningMessage() =>
ok
case _ =>
ko
}
}
"encode" in {
val msg = BeginZoningMessage()
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
pkt mustEqual string
}
}