Improve ChatMsg and fix LoginRespMessage

This commit is contained in:
Chord 2016-08-06 11:23:28 -04:00
parent 38715c0d04
commit cb2507360e
4 changed files with 36 additions and 12 deletions

View file

@ -5,7 +5,7 @@ import net.psforever.crypto.CryptoInterface
import net.psforever.crypto.CryptoInterface.CryptoDHState
import scodec.bits._
class CryptoInterfaceTest extends Specification {
class CryptoInterfaceTest extends Specification { args(stopOnFail = true)
"Crypto interface" should {
"correctly initialize" in {
CryptoInterface.initialize()

View file

@ -206,6 +206,15 @@ class GamePacketTest extends Specification {
pkt_tell mustEqual string_tell
}
"allow and disallow note" in {
ChatMsg(ChatMessageType.CMT_ARMOR,
false,
"DontCare", "DontCare", Some("Should be here")) must throwA[AssertionError]
ChatMsg(ChatMessageType.CMT_NOTE,
false,
"DontCare", "DontCare", None) must throwA[AssertionError]
}
}
"ChangeFireModeMessage" should {