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
.Should().HaveSameCount()
The analysis rule FAA0001: Use .Should().HaveSameCount() is triggered for inputs that are actually combined values:
// Arrange var expectedFirstHalf = new List<int> {0}; var expectedSecondHalf = new List<int> {1}; // Act var actual = new List<int> {10, 11}; // Assert actual.Should().HaveCount(expectedFirstHalf.Count() + expectedSecondHalf.Count());
Since the input (expectedFirstHalf.Count() + expectedSecondHalf.Count()) is actually a calculated value, the analysis rule should not be triggered.
expectedFirstHalf.Count() + expectedSecondHalf.Count()
The rule is triggered and the code fix crashes.
The text was updated successfully, but these errors were encountered:
bugfix: fix analyzer for issue #300
2522752
@FantasyTeddy Thanks for reporting this!
Sorry, something went wrong.
bugfix: fix analyzer for issue #300 and #299 (#303)
b15a52e
* bugfix: fix analyzer for issue #300 * bugfix: fix issue 299
Successfully merging a pull request may close this issue.
Description
The analysis rule FAA0001: Use
.Should().HaveSameCount()
is triggered for inputs that are actually combined values:Expected behavior:
Since the input (
expectedFirstHalf.Count() + expectedSecondHalf.Count()
) is actually a calculated value, the analysis rule should not be triggered.Actual behavior:
The rule is triggered and the code fix crashes.
Versions
The text was updated successfully, but these errors were encountered: