Closed ghost closed 2 years ago
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")); }
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
Closed - I accidentally raised this with the wrong GitHub account 😳 Replaced by #191
If I try to make an assertion against an indexer, I receive an NS1004 error - this seems to be a false positive.
Example:
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