views:

31

answers:

1

Sometimes Rhino.Mocks is driving me mad, 'cause there's not enough documentation on topics that, I suppose, are relatively easy.

What I want to do is to expect call to AddContact("test", contact). So for the second parameter I must use parameter constraint Property.AllPropertiesMatch(contact). But what should I use for the first one?

_contactManagerMock
    .Expect(m => m.AddContact(null, null))
    .Constraints(??????????, Property.AllPropertiesMatch(contact));

What goes instead of "??????????"

A: 

Okay, here's the answer:

Text.Like("test")
HiveHicks