Thanks for the input. I guess I can register a testprobe.ref as a
subscriber to the event bus. I will still need to control the creation of
the per-request child so that I can inject a mock storage interface that
acks with success so that the posting to the event bus occurs.

On Tue, Nov 18, 2014 at 2:48 PM, √iktor Ҡlang <viktor.kl...@gmail.com>
wrote:

> You can test that the parent passed the correct set of results to the
> child actor by observing the results of the child actors processing.
>
> Usually it becomes tricky to apply Unit Testing to Actors, think
> Integration testing instead (but at a microlevel).
>
> On Tue, Nov 18, 2014 at 11:43 PM, Richard Rodseth <rrods...@gmail.com>
> wrote:
>
>> The message A in the parent actor is computing a set of results. The
>> per-request child will be saving some state from those results, and if
>> successful, posting a domain event containing the results to an event bus
>> and also acking back to the parent.
>>
>> To begin with, I just wish to test that the parent actor passed the
>> correct set of results to the child constructor.
>>
>>
>>
>> On Tue, Nov 18, 2014 at 2:24 PM, √iktor Ҡlang <viktor.kl...@gmail.com>
>> wrote:
>>
>>> Hi Richard,
>>>
>>> what effects are you trying to test?
>>>
>>> On Tue, Nov 18, 2014 at 11:17 PM, Richard Rodseth <rrods...@gmail.com>
>>> wrote:
>>>
>>>> I have a parent actor which, on receipt of a certain message A, spawns
>>>> a child actor, and sends it a "Run" message with no parameters. The child
>>>> actor has constructor parameters derived from the contents of message A.
>>>>
>>>> What's the best way to test this? I don't think I can apply techniques
>>>> like
>>>> childMaker: ActorRefFactory => ActorRef
>>>> because of the per-request constructor parameters.
>>>>
>>>>
>>>>  --
>>>> >>>>>>>>>> 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.
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> √
>>>
>>> --
>>> >>>>>>>>>> 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.
>>>
>>
>>  --
>> >>>>>>>>>> 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.
>>
>
>
>
> --
> Cheers,
> √
>
> --
> >>>>>>>>>> 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.
>

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