Al,
You are welcome. I understood your pain of writing the test as I have
experienced the same. Your request confirmed that I'm not the only one
needed this feature so I went ahead and tried something myself.
How does this look to you?
(
mock.ActivityOf(m=>m.B(1)) |
mock.ActivityOf(m=>m.B(1,2)) |
mock.ActivityOf(m=>m.B(1,2,3))
).AssertOccured;
If you want exactly once, you can do:
Activities.OneOf(
foo.ActivityOf(f=>f.Foo(1), m=>m.Repeat.Once()),
foo.ActivityOf(f=>f.Foo(1,2), m=>m.Repeat.Once()),
foo.ActivityOf(f=>f.Foo(1,2,3), m=>m.Repeat.Once())
).AssertOccured;
If you are interested and want to give it a try. See
http://kennethxu.blogspot.com/2009/07/introduce-powerful-aaa-syntax-for.html
for detail.
Cheers,
Kenneth
On Wed, Jul 8, 2009 at 12:36 AM, Al<[email protected]> wrote:
>
> Thanks Kenneth,
>
> What you described is exactly what I have. Sorry I didn't explain
> better myself.
>
> I just wanted to check with you that Rhino Mocks doesn't provide
> support for that, before trying something else.
>
> I'll do something similar with what you proposed and make sure my
> condition (that exactly one of the function is called) is met.
>
> Cheers,
> Al
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" 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/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---