Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mxriverlynn/349661 to your computer and use it in GitHub Desktop.
Save mxriverlynn/349661 to your computer and use it in GitHub Desktop.
// I want to mix Arg<T> and actual parameter values like this:
var myMock = RhinoMocks.CreateMock<ISomething>();
myMock.AssertWasCalled(Arg<int>.Is.Anything, "foo bar", Arg<SomeOtherType>.Is.NotNull, 42);
//but it requires me to use Arg<T> everywhere if i want to use it anywhere, like this:
var myMock = RhinoMocks.CreateMock<ISomething>();
myMock.AssertWasCalled(Arg<int>.Is.Anything, Arg<string>.Is.Equal("foo bar"), Arg<SomeOtherType>.Is.NotNull, Arg<int>.Is.Equal(42));
//i don't like that second syntax. why can't it just wrap my parameter value in the appropriate Arg<T>, internally to the mock?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment