I am creating a unit test case for an Akka actor using TestActorRef .
def actorRefFactory = context implicit def executionContext = actorRefFactory.dispatcher implicit val OutputActor = actorRefFactory.actorOf(Props[OutputActor], "OutputActor") val actorRef = TestActorRef[OutputActor] val actor = actorRef.underlyingActor
Getting the following error while creating 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.
I am very new to this. Please help.
source share