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