You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.NullReferenceException : Object reference not set to an instance of an object.
at Moq.Match`1.Matches(Object value)
at Moq.MethodCall.Matches(ICallContext call)
at System.Linq.Enumerable.LastOrDefault(IEnumerable`1 source, Func`2 predicate)
at Moq.ExtractProxyCall.HandleIntercept(ICallContext invocation, InterceptStrategyContext ctx)
at Moq.Interceptor.Intercept(ICallContext invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.ISomeInterfaceProxy.DoSomething(Nullable`1 guid)
The text was updated successfully, but these errors were encountered:
@yrshaikh: I'm mentioning the following just in case that there is a misunderstanding here: The difference between It.IsAny<Guid>() or It.IsAny<Guid?>() lies in whether or not you want to match null as well. In up-to-date versions of Moq, you should no longer see a NullReferenceException (which is what this issue was about) regardless of which form you choose.
Example:
Result:
The text was updated successfully, but these errors were encountered: