If the ActorSystem is not needed for the initialization of the service then why 
do you pass it in the constructor? You could just pass it into those methods 
that need it instead. Or split up the service into two parts along this line.

Regards,

Roland

> 21 jun 2015 kl. 02:08 skrev Maatary Okouya <[email protected]>:
> 
> I have a Service class that takes an actor system at construction time. Some 
> of the method of the service use spray client, that's the reason. 
> 
> For testing other method of the class i need to provide for a dump actor 
> system simply for the initialization of the class. Is there a way to get a 
> dump actor system, i don't even need to mock it. 
> 
> 
> One solution that i see is to wrap my actor system in an option and have some 
> logic in the code that would deal with. Then that would allow me to test the 
> method of of my service that do not need it. I would instantiate my class 
> with None for the purpose of the test.  
> 
> But that is just too trick for so little. 
> 
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/ <http://akka.io/docs/>
> >>>>>>>>>> Check the FAQ: 
> >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >>>>>>>>>> <http://doc.akka.io/docs/akka/current/additional/faq.html>
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user 
> >>>>>>>>>> <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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/akka-user 
> <http://groups.google.com/group/akka-user>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.



Dr. Roland Kuhn
Akka Tech Lead
Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
twitter: @rolandkuhn
 <http://twitter.com/#!/rolandkuhn>

-- 
>>>>>>>>>>      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.

Reply via email to