mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-05 21:20:20 +00:00
added and expanded tests in hopes of increasing code coverage score
added tests for AvatarService and PacketCodingActor; especially PCA tests
This commit is contained in:
parent
0e5afe6cfd
commit
3aee0ab4e8
69 changed files with 4534 additions and 3037 deletions
|
|
@ -10,7 +10,7 @@ import objects.ActorTest
|
|||
|
||||
import scala.concurrent.duration.Duration
|
||||
|
||||
class TerminalControlTest extends ActorTest() {
|
||||
class TerminalControl1Test extends ActorTest() {
|
||||
"TerminalControl" should {
|
||||
"construct (cert terminal)" in {
|
||||
val terminal = Terminal(GlobalDefinitions.cert_terminal)
|
||||
|
|
@ -19,6 +19,17 @@ class TerminalControlTest extends ActorTest() {
|
|||
}
|
||||
}
|
||||
|
||||
class TerminalControl2Test extends ActorTest() {
|
||||
"TerminalControl can not process wrong messages" in {
|
||||
val terminal = Terminal(GlobalDefinitions.cert_terminal)
|
||||
terminal.Actor = system.actorOf(Props(classOf[TerminalControl], terminal), "test-cert-term")
|
||||
|
||||
terminal.Actor !"hello"
|
||||
val reply = receiveOne(Duration.create(500, "ms"))
|
||||
assert(reply.isInstanceOf[Terminal.NoDeal])
|
||||
}
|
||||
}
|
||||
|
||||
//terminal control is mostly a pass-through actor for Terminal.Exchange messages, wrapped in Terminal.TerminalMessage protocol
|
||||
//test for Cert_Terminal messages (see CertTerminalTest)
|
||||
class CertTerminalControl1Test extends ActorTest() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue