Does your Message object override Equals or the == operator? --- Patrick Steele http://weblogs.asp.net/psteele
On Fri, Nov 12, 2010 at 5:23 PM, Beth Hechanova <[email protected]> wrote: > Hi, > > > > I want to assert that a certain method was called and the parameter is an > object. One property of that object is a timestamp, so I want to ignore > that particular property. > > > > I’ve tried various permutations of PropertyConstraints, but I can’t seem to > get it quite right. > > > > For example, I have the object Message, with string properties ‘To’, > ‘Subject’, and a DateTime for the timestamp. > > I have set up a variable ‘expected’ of type Message that has all the > properties (except for the timestamp) set to the expected data called to the > mock object. > > > > I originally set my expection: > > _mailBoxDataWrapper.Expect(x => x.Save (expected)); > > > > Which fails due to the timestamp property not matching, which I expected. > > So now I am trying to modify the expectation so it compares all properties > in the expected Message except for the timestamp. > > > > I have been trying to use the PropertyConstaints, but can’t seem to quite > get it right. Or maybe there is a better way? > > > > I’m using Rhino Mocks 3.5 for the .NET 3.5 framework. > > > > Thanks, > > Beth > > > > > > ________________________________ > This email and any files transmitted with it are confidential & proprietary > to Systems and Software Enterprises, Inc. (dba IMS). This information is > intended solely for the use of the individual or entity to which it is > addressed. Access or transmittal of the information contained in this > e-mail, in full or in part, to any other organization or persons is not > authorized. > > -- > 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. > -- 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.
