This is simply not implemented yet.
As you’ve likely noticed with the big warning on the typed docs page – it’s
in an early preview mode and not all things are implemented currently.

—
Konrad `kto.so` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 24 August 2017 at 18:39:01, Saloni Vithalani ([email protected])
wrote:

Hello everyone,

I am having a class that extends akka.typed.scaladsl.Actor.MutableBehavior
as follows:

class Container(ctx: ActorContext[ContainerMsg]) extends
MutableBehavior[ContainerMsg] {


      def someMethod() = {

          some code ...

          ctx.self.toUntyped

      }

}




While writing test for "someMethod" of "Container" with


val system: ActorSystem[Nothing]    = ActorSystem(Actor.empty,
"container-system")

val ctx = new StubbedActorContext[ContainerMsg]("test-container", 100, system)

val container = new Container(ctx)

container.someMethod() shouldBe something


it throws an exception of

only adapted untyped ActorRefs permissible


because the "ctx" in "Container" is not created using
"akka.actor.ActorSystem". Is there any work around for this in
akka.typed.testkit?


--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to