-
Notifications
You must be signed in to change notification settings - Fork 6
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
NS2002 falsely triggered when substituting an interface #205
Comments
hi @davidkeaveny |
Hello |
Hello. Can confirm. Sometimes these errors just appears. Only Rider cache invalidation helps. |
There is not much I can do here. This seems to be Rider Roslyn analyzers support issue rather than NSubstitute.Analyzers bug. I will send bug report to Jetbrains if I encounter this problem on my own - as reporting this without any logs doesnt make sense. Alternatively @SonicGD or @davidkeaveny you can report this on your own https://youtrack.jetbrains.com/issues/RIDER and link the issue here |
I just updated from .NET 7 to .NET 8 and I saw this start happening. Restarting Rider with cache invalidation cleared this up. |
I have a simple interface and a class that dispatches against it:
When I create a test that exercises the interface, I'm getting an NS2002 error when creating the substitute:
Given that it is substituting an interface, it shouldn't be complaining about constructor parameters.
I am using NSubstitute 5.0.0 with NSubstitute.Analyzers 1.0.16.
The text was updated successfully, but these errors were encountered: