I\'ve got a pair of Lists I\'m trying to compare using Fluent Assertions. I can code up a comparison easily, but I\'d like to use Fluent Assertions so that I can get the rea
How about adding a new Fluent assertion via an extention method (or two)? I've written code to add a .EqualInsensitively(...)
to the available fluent assertions for a collection of strings.
I've put the code to implement this on an external pastebin because its a little long and the MS-PL might not be compatible with CC-Wiki.
Use something like this:
private static void Main()
{
var mylist = new List {"abc", "DEF", "GHI"};
mylist.Should().EqualInsensitively(new[] {"AbC", "def", "GHI"})
.And.NotContain(string.Empty); //Emaple of chaining
}