Ich erstelle einen Unit Test Case für einen Akka Actor mit TestActorRef
.konnte keinen impliziten Wert für das Parametersystem finden: akka.actor.ActorSystem
def actorRefFactory = context
implicit def executionContext = actorRefFactory.dispatcher
implicit val OutputActor = actorRefFactory.actorOf(Props[OutputActor], "OutputActor")
val actorRef = TestActorRef[OutputActor]
val actor = actorRef.underlyingActor
gibt es die folgenden Fehler bei der Erstellung von actorRef:
- could not find implicit value for parameter system: akka.actor.ActorSystem
- not enough arguments for method apply: (implicit t:
scala.reflect.ClassTag[org.musigma.muhpc.OutputActor], implicit system:
akka.actor.ActorSystem)akka.testkit.TestActorRef[org.musigma.muhpc.OutputActor] in object
TestActorRef. Unspecified value parameter system.
Ich bin sehr neu in diesem. Freundlich helfen.
wie ein Charme. Vielen Dank! –
Ja, dies wurde nicht in http://doc.akka.io/docs/akka/2.4/scala/testing.html angegeben. Danke, dass du es aufgezeigt hast. – Philippe