Description
CollectionShouldOnlyHaveUniqueItemsByComparer is triggered by this code
var list = new[] { 1, 2, 3 };
list.Select(e => e.ToString())
.Where(e => e != "")
.Should()
.OnlyHaveUniqueItems();
Which turns it into this invalid code, as the Where now tries to compare an int to a string.
var list = new[] { 1, 2, 3 };
list.Where(e => e != "")
.Should()
.OnlyHaveUniqueItems(e => e.ToString());
Expected behavior:
The analyzer should not be triggered.
Actual behavior:
The analyzer is triggered.
Versions
Fluent Assertions Analyzers 0.11.2
.NET Framework 4.6.1