I have an interface with the following method:
bool ProcessActions(int actionTypeId, out List<int> ints, params object[] actionParameters);
Now how can mock this method to return a value using NSubstitute? Here is what I've tried:
this.actionOperationsMock.ProcessActions(Arg.Any<int>(), out List<int> _, Arg.Any<int>(), Arg.Any<int>(), Arg.Any<int>(), Arg.Any<DateTime>(), Arg.Any<DateTime>(), Arg.Any<string>()).Returns(
x =>
{
x[1] = null;
return true;
});
I've tried to mock it only with the first two parameters, but in my tests, this method is returning false.