akka actor testing using play

前端 未结 1 939
北海茫月
北海茫月 2021-01-13 12:57

I want to test my akka actor. Is it possible to test every case of receive function?

def receive = {

  case msg: String =>
    println(\"SUCCESS\" + msg)         


        
1条回答
  •  别那么骄傲
    2021-01-13 13:34

    Yes, if you want to test if you are sending a successful message and just want to see that your actor system works. You can use

    case _ => println("sending message success")
    

    0 讨论(0)
提交回复
热议问题