Open MuOuchen opened 1 year ago
I cant really explain why, but the problem is the "null" in the expectation. Seems NSubstitute cannot figure the right Arg.Is syntax in that case.
If you replace the null with Arg.Is it works:
mock.Received(1).WeirdMethod(Arg.Any<string>(), Arg.Is<string>(v => v == null), Arg.Any<string>(), CancellationToken.None);
Describe the bug I get the following exception, the expected does not fit my argument definition:
To Reproduce
Try this test for example:
Expected behaviour The matched argument should be:
(Arg.Any<string>(), <null>, Arg.Any<string>(), System.Threading.CancellationToken)
Environment: