I am attempting to verify that this methid is called.
foo.Error(1, null,"", new Exception("Could not find test data"));
I make the method call and through debugger can see the call succeed but when I run the recieved call.
fakefoo.Received().Error(Arg.Is(1), Arg.Is<object>(null), Arg.Is<string>(""), Arg.Is<Exception>(new Exception("Could not find test data")));
The test fails with the following exception.
NSubstitute.Exceptions.ReceivedCallsException: Expected to receive a call matching:
Error(1, <null>, "", System.Exception: Could not find test data)
Actually received no matching calls.
Received 1 non-matching call (non-matching arguments indicated with '*' characters):
Error(1, <null>, "", *System.Exception: Could not find test data*)
Can anyone explain why System.Exception: Could not find test data does not match System.Exception: Could not find test data
Thanks
N8