I have a matcher for an expected call such as:
_logger.Received(1).Log(
LogLevel.Information,
Arg.Is<string>(x => x.Contains("has been disabled")),
Arg.Any<Exception?>()
);
But its throwing an error saying...
Error Message:
NSubstitute.Exceptions.ReceivedCallsException : Expected to receive exactly 1 call matching:
Log(Information, x => x.Contains("has been disabled"), any Exception)
Actually received no matching calls.
The question / request here is that this is a fairly common failure scenario, something changes and the matcher no longer matches, but unlike an equality check there is no output printed about the actual value here, which would be incredibly useful. It would be very nice if in this scenario when no calls are matched, if a count actual calls was emitted (knowing if there was 0 calls or not is very useful) but if there was at least one calls to emit a sample of actual values, perhaps first last and random from the middle...
Just saying its very difficult to debug the issue in some cases where you don't have the actual values recieved to contrast the test with.
If its possible to configure this in NSubsitute already I would love to hear about it! Thanks.