if you are sure you aren't going to reference the val, then you could do something like

val fakeSystem = null.asInstanceOf[ActorSystem]

-Michael

On 06/20/15 17:05, Maatary Okouya wrote:
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.

Any 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, to work with a None.

But that is just too much work
--
>>>>>>>>>> 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] <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.
For more options, visit https://groups.google.com/d/optout.

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