NSubstitute: How to access actual parameters in Returns

Viewed 7601

I would like to access actual parameter in NSubstitute Returns method. For example:

var myThing = Substitute.For<IMyThing>()
myThing.MyMethod(Arg.Any<int>).Returns(<actual parameter value> + 1)

Using NSubstitute what should I write in place of <actual parameter value>, or how can I achieve the equivalent behavior?

1 Answers
Related