Hi Leon, Yes, you can do that with receiveOne(d: Duration): AnyRef call.
Do not hesitate to look at testing<http://doc.akka.io/docs/akka/snapshot/scala/testing.html>docs and testkit example <http://doc.akka.io/docs/akka/current/scala/testkit-example.html>. On Fri, May 23, 2014 at 9:59 AM, Leon Ma <[email protected]> wrote: > Hi, > > Usually I do: > > actorRef ! SomeRequest > expectMsg(SomeResponse) > > > However I'd like to know whether I can get the last response message > object like this: > > actorRef ! SomeRequest > val resp = lastMsg() > > resp.propA should be (...) > resp.StringProp contains "mysubstring" should be(true) > > > Is it doable? > > > > Thanks > > Leon > > -- > >>>>>>>>>> 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 http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Martynas Mickevičius Typesafe <http://typesafe.com/> – Reactive<http://www.reactivemanifesto.org/>Apps on the JVM -- >>>>>>>>>> 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 http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
