Close, but not quite right - the syntax below gave a "number of constraints is 
not the same as the number of the method's parameters" error.  So I changed the 
constraints to && everything, and that worked.  Thanks very much!

_mailBoxDataWrapper.Expect(x => x.Save (expected)).Constraints(
     Rhino.Mocks.Constraints.Property.Value("To", "someone") &&
     Rhino.Mocks.Constraints.Property.Value("From", "someone other"));

And there is an Equals method on the Message object, but it includes checking 
the timestamp.  We didn't want to remove the timestamp from the Equals check, 
thus I was looking for another way to confirm the Message had the correct 
properties (excluding timestamp).

Thanks again,
Beth

-----Original Message-----
From: Nils Andresen [mailto:[email protected]] On Behalf Of Nils 
Andresen
Sent: Saturday, November 13, 2010 5:28 AM
To: [email protected]
Cc: Beth Hechanova
Subject: Re: [RhinoMocks] Ignoring a property in an object set up for 
expectations

Am 12.11.2010 23:23, schrieb Beth Hechanova:
> 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 am currently unable to test this, but

_mailBoxDataWrapper.Expect(x => x.Save (expected)).Constraints(
     Rhino.Mocks.Constraints.Property.Value("To", "someone"),
     Rhino.Mocks.Constraints.Property.Value("From", "someone other"));

Does not work?

Nils



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.


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.

Reply via email to