Reputation: 182
I'm trying to replace usage of "CollectionAssert.AreEquivalent()" with FluentAssertion".
I've tried using ShouldAllBeEquivalentTo, but the function doesn't fail when comparing similar objects of different types.
In the example below, both calls succeed. I want the 2nd one to fail.
new int[] { 1, 2 }.ShouldAllBeEquivalentTo( new int[] { 2, 1 } );
new int[] { 1, 2 }.ShouldAllBeEquivalentTo( new string[] {"1", "2"} );
Is there an alterantive function or a certain option which would make the 2nd line fail?
Upvotes: 1
Views: 422