Talking about "exchange of messages", I'm assuming you mean actors and not agents (which are a distinct concept). The usual approach is to use a `TestActorRef` which then forces everything to be synchronous/deterministic and gives you access to the guts of the underlying actor implementation.
Doc for scala is here: http://doc.akka.io/docs/akka/2.0.3/scala/testing.html Surprisingly, this is one area where Akka doesn't provide an equivalent page for Java. The ideas should be directly translatable to Java though. As for community, Akka's is perhaps the most friendly of any in the Scala ecosystem. Please don't hold back from asking even very-beginner-level questions there. It might also be a good place to ask about Java-oriented documentation for the Akka test kit :) Failing that... You can always ask on stack overflow, I've found it generally has a very fast turnover rate for questions on Akka or Scala, and you'll leave the answer in a place where it can more easily be found by the next person to ask! On 29 September 2012 20:26, Fabrizio Giudici <[email protected]>wrote: > On Sat, 29 Sep 2012 21:09:16 +0200, Kevin Wright <[email protected]> > wrote: > > Akka's own documentation is rather good, and free, and has dedicated >> sections to cover all the relevant functionality via both the Scala and >> Java APIs. >> >> Having said that (and my opinion may be seen as controversial here)... >> You >> may find it easier to start learning the Scala API and then apply that >> understanding to Java. Pattern matching and first-class functions are >> both >> very heavily used concepts and can be directly expressed in Scala, once >> you >> understand the "big picture" then Java's encoding of these ideas will be >> far less distracting from the core ideas. >> > > I don't have problems with the Akka APIs (Java in my case), which I'm > already using - though still at an elementary level. > I'm searching for something specifically aimed at tests with agents. For > instance, in my studies so far I've ended up with writing a small message > recorder and the Hamcrest support for post-test assertions, as in some > tests I'm verifying that there's a specific exchange of messages. I bet > this is naive, due to the async nature of ages. What I need are agent > testing best practices, I suppose there are some out there... > > > -- > Fabrizio Giudici - Java Architect @ Tidalwave s.a.s. > > "We make Java work. Everywhere." > http://tidalwave.it/fabrizio/**blog <http://tidalwave.it/fabrizio/blog> - > [email protected] > -- Kevin Wright mail: [email protected] gtalk / msn : [email protected] quora: http://www.quora.com/Kevin-Wright google+: http://gplus.to/thecoda <[email protected]> twitter: @thecoda vibe / skype: kev.lee.wright steam: kev_lee_wright "My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger" ~ Dijkstra -- You received this message because you are subscribed to the Google Groups "Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
