Closed
Description
Description
The analysis rule FAA0001: Use .Should().OnlyHaveUniqueItems()
is triggered for collections that are not actually the same:
// Arrange
var expected = new List<string> {"First"};
// Act
var actual = new List<int> {0};
// Assert
actual.Should().HaveSameCount(expected.Distinct());
Expected behavior:
This code should not trigger the rule about using .OnlyHaveUniqueItems()
, since it has a different meaning (consider that expected
is passed in, instead of actual
).
Actual behavior:
The rule is triggered.
Versions
- Fluent Assertions Analyzers version: 0.29.1
- .NET Runtime/Target: .NET 8
Metadata
Metadata
Assignees
Labels
No labels