We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I try to make an assertion against an indexer, I receive an NS1004 error - this seems to be a false positive.
Example:
interface IInterfaceWithIndexer { string this[int index] { get; set; } string SetSomething(int index, string value); } [Fact] public void MockInterfaceWithIndexer() { var mock = Substitute.For<IInterfaceWithIndexer>(); mock.Received()[5] = Arg.Is("five"); mock.Received().SetSomething(5, Arg.Is("five")); }
There's no problem with the assertion against the method, only against the indexer.
I think I'm using the correct syntax for asserting against indexers - I used the guide here: https://nsubstitute.github.io/help/received-calls/#checking-calls-to-indexers
The text was updated successfully, but these errors were encountered:
My apologies - this appears to have been resolved in 1.0.15 (I was using 1.0.14)
Sorry, something went wrong.
No branches or pull requests
If I try to make an assertion against an indexer, I receive an NS1004 error - this seems to be a false positive.
Example:
There's no problem with the assertion against the method, only against the indexer.
I think I'm using the correct syntax for asserting against indexers - I used the guide here: https://nsubstitute.github.io/help/received-calls/#checking-calls-to-indexers
The text was updated successfully, but these errors were encountered: