mercredi 27 décembre 2017

How to mock context(ActorContext)?

I am using TestKit to test the Akka Actors. I have a class Demo which has method getActorRef, which takes input as string and returns an ActorRef.

class Demo @Inject()(a: A. b: B, context: ActorContext) {
  def getActorRef(id: String): ActorRef
}

I have mocked A,B while creating object of Demo.Now i am facing issue how to mock context.

What i did to mock it ? val context = mock[ActorContext]

But it didn't work.

Aucun commentaire:

Enregistrer un commentaire