Closed
Description
Describe the bug
I am seeing an intermittent ArgumentNullException thrown by the AutoTaskProvider in our test suite. The error moves around in our test suite, but it always has the same stacktrace:
System.ArgumentNullException : Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
at NSubstitute.Routing.AutoValues.AutoTaskProvider.GetValue(Type type)
at NSubstitute.Routing.Handlers.ReturnAutoValue.GetResultValueUsingProvider(ICall call, Type type, IAutoValueProvider provider)
at NSubstitute.Routing.Handlers.ReturnAutoValue.Handle(ICall call)
at NSubstitute.Routing.Route.Handle(ICall call)
at NSubstitute.Proxies.CastleDynamicProxy.CastleForwardingInterceptor.Intercept(IInvocation invocation)
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.Proxies.ObjectProxy_55.Read(Asset asset)
This behavior started after updating NSubstitute from 3.1.0
to 4.2.1
Metadata
Metadata
Assignees
Labels
No labels