I have a code like this
With.Mock(repo).Expecting(() =>
{
Expect.Call(mock.F1()).Return(true);
Expect.Call(mock.A()).IgnoreArguments().Return(-1); // actually a long
instruction
Expect.Call(mock.B()).IgnoreArguments().Return(-1); // even more long :
(
Expect.Call(mock.A()).IgnoreArguments().Return(-1);
Expect.Call(mock.B()).IgnoreArguments().Return(-1);
Expect.Call(mock.A()).IgnoreArguments().Return(-1);
Expect.Call(mock.B()).IgnoreArguments().Return(-1);
Expect.Call(mock.A()).IgnoreArguments().Return(-1);
Expect.Call(mock.B()).IgnoreArguments().Return(-1);
Expect.Call(mock.A()).IgnoreArguments().Return(-1);
Expect.Call(mock.B()).IgnoreArguments().Return(-1);
})...
A then B are repeated multiple times (actually 10), so my expectations
section is long more than 100 lines of code.
IMethodOptions.Repeat looks unusable because i need to repeat the
sequence A -> B and not a single call.
Looks I need something like:
var a = Expect.Call(mock.A()).IgnoreArguments().Return(-1);
var b = Expect.Call(mock.B()).IgnoreArguments().Return(-1);
a.Then.b.Repeat.Times(10);
Any suggestion? Thanks
--
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.