mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-03-14 18:00:38 +00:00
Restructure repository
* Move /common/src to /src * Move services to net.psforever package * Move /pslogin to /server
This commit is contained in:
parent
89a30ae6f6
commit
f4fd78fc5d
958 changed files with 527 additions and 725 deletions
29
src/test/scala/game/VoiceHostRequestTest.scala
Normal file
29
src/test/scala/game/VoiceHostRequestTest.scala
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (c) 2017 PSForever
|
||||
package game
|
||||
|
||||
import org.specs2.mutable._
|
||||
import net.psforever.packet._
|
||||
import net.psforever.packet.game._
|
||||
import net.psforever.types.PlanetSideGUID
|
||||
import scodec.bits._
|
||||
|
||||
class VoiceHostRequestTest extends Specification {
|
||||
val string_request = hex"b0 2580 00"
|
||||
|
||||
"decode" in {
|
||||
PacketCoding.DecodePacket(string_request).require match {
|
||||
case VoiceHostRequest(unk, player, _) =>
|
||||
unk mustEqual false
|
||||
player mustEqual PlanetSideGUID(75)
|
||||
case _ =>
|
||||
ko
|
||||
}
|
||||
}
|
||||
|
||||
"encode" in {
|
||||
val msg = VoiceHostRequest(false, PlanetSideGUID(75), ByteVector.empty)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string_request
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue