Created
March 30, 2010 22:18
-
-
Save mxriverlynn/349661 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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