The problem is the following:

You specify Calls the the mock, lets say:
- foo(A)
- foo(B)

You'r application calls actually:
- foo(B)
- foo(C)

so what's actually wrong? If it was a dynamic mock (the common case),
the call foo(C) is allowed. So there is only one call missing, RM says
that the expected call to foo(A) did not happen.

What you probably expect is that RM says that the call to foo had an
argument C instead of A.

I implemented a "AssertArguments" patch, but it never went to the
trunk. You could say, if foo is called, it should assert that the
argument is A. Then RM can tell you that A has been expected and B has
been passed.


On 14 Aug., 08:15, Iain Waddell <[email protected]> wrote:
> > I have some unit tests which expect several constrains on a method. If
> > one of the constraints fail, it is impossible to know which one is the
> > issue based on the message of the thrown exception.
>
> > It would be good if this message could be updated to indicate either
> > the value tested along with the value expected or even better,
> > indicate which constraint failed?.
>
> Or you could write multiple similar tests and only assert on one constraint
> in each test. This is what I do for precisely the reason you cite.
>
> Iain
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to