I admit to some confusion about why you're trying to have objects behave one
way (with value equality) when under test but not when in production
(presumably reverting to their default reference equality).  This seems to
me to be at best confusing and worst rendering your tests mostly useless.

Can you expand a bit on the context of why you would even want this in your
tests (as I am very curious)?

Steve Bohlen
[email protected]
http://blog.unhandled-exceptions.com
http://twitter.com/sbohlen


On Mon, Jun 21, 2010 at 8:54 AM, Dewy <[email protected]>wrote:

> In our tests we use Value Equality on our objects to check that they
> have the same values rather than being the same object.
> When we set up expectations we have gotten around this by making all
> our objects be Value Objects (via base class and override of Equals)
> which we don't really want in the production code.
>
> I see that there is a way to get around this by creating new
> constraints where we can do as we see fit.
> What I am really looking for is a way to override ALL equality for all
> mocks, such that we don't have to say on every Expect(...) that we
> want to use a custom constraint, say some way to override this when we
> first create the MockRepository?
> Is there a way already to do this?
>
> --
> 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]<rhinomocks%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rhinomocks?hl=en.
>
>

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