1
私はAkkaのコンポーネントの次のテストを持っている:見つかりません:値expectMsg
import somePackage.SomeActor
import akka.actor.{ActorSystem, Props}
import org.scalatest.{FlatSpec, Matchers}
class SomeActorSpec extends FlatSpec with Matchers {
val system = ActorSystem()
val someActorRef = system.actorOf(Props(classOf[SomeActor]))
it should "check the id" in {
someActorRef ! CheckIfJobIsRunning(UUID.randomUUID)
expectMsg(SomeOtherMessage(List()))
}
}
私はエラーを取得する:
1.How缶:
not found: value expectMsg
[error] expectMsg(SomeOtherMessage(List()))
は、私は2つの質問があります私はexpectMsg
を使用していますか?
2.テストクラスで受信する必要があるSomeOtherMessage
を定義しますか?