At the moment I have the following
constraintFactory.Expect(x =>
x.ValidateStringNotNull(Arg<IList<IConstraint>>.Is.Anything,
Arg.Is("Salutation"), Arg.Is("X")));
This expects a call of
IConstraintFactory.ValidateStringNotNull(brokenConstraints,
"Salutation", "X");
If I were to change my parameters to an object, as we do with EventArgs....
public class ValidateStringNotNullArgs
{
public IList<IConstraint> BrokenConstraints { get; }
public string FieldName { get; }
public string ValueToCheck { get; }
//constructor omitted
}
How would I validate the argument in the mock then? In English I need to
say
Expect
ValidateStringNotNull
WithASingleParameter of type ValidateStringNotNullArgs
Where BrokenConstraints is anything
And Where FieldName property == "Salutation"
And Where ValueToCheck == "X"
I hope that makes sense, and that it is possible :-)
Regards
Pete
====
http://mrpmorris.blogspot.com
http://www.AlterEgos.com - Who do you want to be?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---