The way I've normally done this sort of thing is with the arg<T>.matches():

Arg<double>.Matches(p=>Math.Round(p,2)==testVal)


2009/12/1 dhearing1 <[email protected]>

> Hi,
>
> I'm using the AllPropertiesMatch constraint, but some of the objects I
> am testing have Double properties, and I would like to supply a delta
> so that the expected and actual values can be different as long their
> difference is less than delta.  This allows for rounding errors.
>
> Is there any way to do this?
>
> Thanks,
>
> Dominic
>
> --
>
> 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