Hi Roger, 9 feb 2014 kl. 10:57 skrev Roger Alsing <[email protected]>:
> I've ported the following test to .NET > https://github.com/akka/akka/blob/master/akka-actor-tests/src/test/scala/akka/actor/ActorLifeCycleSpec.scala > > However, there is one thing I don't get with this implementation. > On line 28. > def receive = { case "status" ⇒ sender() ! message("OK") } > > The LifeCycleTestActor is responding to the sender, it is not passing the > "OK" response via the "report" function. > In my port, I pass the response via the report function, so that all outgoing > messages arrive at the same place. > > How can the "OK" response be available to the "expectMsg" in the scala > version when there is no sender? > you are sending "status" from the test spec to the restarter so I assume the > sender() will be NoSender? Hint: the sender is provided by something which is named on this line. Regards, Roland > > Am I reading this wrong? or is there some other magic in the test spec that > makes it possible to expectMsg here? > > //Roger > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: http://akka.io/faq/ > >>>>>>>>>> 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 http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/groups/opt_out. Dr. Roland Kuhn Akka Tech Lead Typesafe – Reactive apps on the JVM. twitter: @rolandkuhn -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://akka.io/faq/ >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/groups/opt_out.
