I have a problem using Fluent Assertions to compare two collections of type List<List<string>>
. When using the Should().Equal()
method (order is important) I get the following (cryptic ;-) message:
Expected collection to be equal to {{"Telefoonnummer"}, {"E-mailadres"}, {"E-mailadres controle"}}, but {{"Telefoonnummer"}, {"E-mailadres"}, {"E-mailadres controle"}} differs at index 0.
So, the objects appear to be equal. Also when debugging the objects appear to be exactly the same. When comparing two List<string>
objects the test passes, no problems, but the same test with List<List<string>>
fails. Am I using the wrong assertion method? Or does Fluent Assertions not handle this type of collection correctly?