How about extracting the actor’s behaviour to a trait, and test that trait for 
the expected throw behaviour using plain old ScalaTest `intercept[Exception] { 
… }`, would it make sense in your case or are the interactions “very relying on 
the thing being an actor”?

Having that said, it’s just my personal preference to test like this.
So other options are… 
   a) what you described already, preparing a special parent actor
   b) overriding `aroundReceive(…)` in the tested actor, since it’s “around”, 
you can have your `intercept[…]` code there. (Feels a bit weird though.)

I hope one of these options fits you! :-)

-- 
Konrad 'ktoso' Malawski
hAkker - Typesafe, Inc

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to