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
SetupAllProperties
public interface IX { string this[int index] { get; } } [Fact] void SetupAllProperties_should_not_reset_indexer_setups() { var mock = new Mock<IX>(); mock.SetupGet(x => x[1]).Returns("value from setup"); Assert.Equal("value from setup", mock.Object[1]); // passes mock.SetupAllProperties(); Assert.Equal("value from setup", mock.Object[1]); // fails }
This is caused by this line:
https://github.com/moq/moq4/blob/81d1fb24b5a9c5ceb443114b1657137501c4f9e5/src/Moq/SetupCollection.cs#L62
The filter condition should be more specific and rule out indexer accessors.
The text was updated successfully, but these errors were encountered:
stakx
Successfully merging a pull request may close this issue.
Code to reproduce:
This is caused by this line:
https://github.com/moq/moq4/blob/81d1fb24b5a9c5ceb443114b1657137501c4f9e5/src/Moq/SetupCollection.cs#L62
The filter condition should be more specific and rule out indexer accessors.
The text was updated successfully, but these errors were encountered: