John K
John K

Reputation: 28869

Wildcard argument in a method mock, to match anything?

When I'm making an Expect.Call(mock.method(arg1, arg2 ..)).., is there a way by which I can make one of the method arguments a wildcard so the mock will match it no matter what the runtime argument value is? Otherwise, is there another means to achieve this behaviour using Rhino Mocks?

Rhino Mocks 3.6

Upvotes: 1

Views: 403

Answers (1)

John K
John K

Reputation: 28869

Heh. Shortly after posting I found the IgnoreArguments() method:

        Expect.Call(dataAccessMock.SetCustomer(oCustomer, out strOutCustId))
            .IgnoreArguments();

which states:

// Summary:
// Ignores the arguments for this method. Any argument will be matched againt [sic]
// this method.

Upvotes: 1

Related Questions