I have two collections that contain objects of my custom type. I compare these collections using FluentAssertions library:
Collection1.Should().BeEquivalentTo(Collection2);
Let's say, objects in the collections have string property called Title
, but sometimes their case is different (title case vs. upper case). The comparison fails due to this.
Is there a way to ignore case for some (or all) object's string properties when comparing collections?
No, sorry. But you could create your own implementation of IMemberSelectionRule