A verification along the lines of:
mock
.Verify(x => x.SomeCall(It.Matches(y => y.SomeNullableThing.HasValue)))
.WasCalledExactlyOnce();
results in an exception:
System.Reflection.TargetException: Non-static method requires a target
A simple workaround in this specific example is to change to:
mock
.Verify(x => x.SomeCall(It.Matches(y => y.SomeNullableThing != null)))
.WasCalledExactlyOnce();
NOTE: tested on mono only (Xamarin/iOS).
A verification along the lines of:
results in an exception:
A simple workaround in this specific example is to change to:
NOTE: tested on mono only (Xamarin/iOS).