У меня есть Актер, который похож на следующий Актер в функции.
case class SupervisingActor() extends Actor {
protected val processRouter = //round robin router to remote workers
override def receive = {
case StartProcessing => { //sent from main or someplace else
for (some specified number of process actions ){
processRouter ! WorkInstructions
}
}
case ProcessResults(resultDetails) => { //sent from the remote workers when they complete their work
//do something with the results
if(all of the results have been received){
//*********************
self ! EndProcess //This is the line in question
//*********************
}
}
case EndProcess {
//do some reporting
//shutdown the ActorSystem
}
}
}
}
Как я могу проверить, что сообщение EndProcess отправлено самому себе в тесте?
Я использую scalatest 2.0.M4, Akka 2.0.3 и Scala 1.9.2.