我是 scala akka 的新手
在我的测试代码中我有这个
val sendEmailActor = system.actorOf(SendEmailActor.props)
sendEmailActor ! email
expectMsgClass(SendEmailActor.SendEmailResult.getClass)
但我测试失败了。
java.lang.AssertionError: assertion failed:
expected class vndirect.elasticemail.actor.SendEmailActor$SendEmailResult$,
found class vndirect.elasticemail.actor.SendEmailActor$SendEmailResult
所以我的 SendEmailActorSendEmailResult
按预期返回 a 。但是测试单元失败了。我不知道为什么。SendEmailActor$SendEmailResult$
和有什么区别SendEmailActor$SendEmailResult