-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not possible to Substitute.For(new[] { typeof(ISomething) }, null) in 4.3.0 #685
Comments
Had missed that there already was a pull request for this: |
This is also the cause of MRCollective/AutofacContrib.NSubstitute#65 |
NSubstitute 4.4.0 should include the fix for this. Could you please confirm? |
Upgraded to v4.4.0 and ran all my tests; I'm not able to reproduce this issue anymore. |
Fixes these issues that were introduced after v4.2.2: - nsubstitute/NSubstitute#683 - nsubstitute/NSubstitute#685 - MRCollective/AutofacContrib.NSubstitute#65
Great! Then I will close this as done :) |
NSubstitute/src/NSubstitute/Proxies/CastleDynamicProxy/CastleDynamicProxyFactory.cs
Line 167 in f890efa
It was changed from:
to
Those two statements behave differently if array is null. The old code resulted in false but the new code returns true in this case. I don't think that was an intentional change?
Changing it to this should fix it:
The text was updated successfully, but these errors were encountered: