The following seems inconsistent between .Should().BeEquivalentTo and .ShouldBeEquivalentTo
public class InconsistentBeEquivalentTo
{
[Test, Category("Inconsistent")]
public void FluentAssertionOnGenericListShouldBeBehaveConsistentForShouldBeEquivalentTo()
{
new[] { 1, 2, 3 }.ShouldBeEquivalentTo(new[] { "1", "2", "3" });
// SUCCESS
}
[Test, Category("Inconsistent")]
public void FluentAssertionOnNonGenericListShouldBeBehaveConsistentForShouldBeEquivalentTo()
{
((IEnumerable)new[] { 1, 2, 3 }).Should().BeEquivalentTo(new object[] { "1", "2", "3" });
// FAIL: Expected collection {1, 2, 3} to be equivalent to {"1", "2", "3"}, but it misses {"1", "2", "3"}.
}
}