What is the best way in FluentAssertions
to check that two objects are not equivalent, if the class does not implement Equals and I want to do field-by-field comparison with reflection? Basically I want the opposite of Should().BeEquivalentTo()
, which is defined for all objects.
There is a NotBeEquivalentTo
defined for collections, but my objects are not collections.
I don't want NotBe
or NotBeSameAs
, because one calls Equals and the other checks references. I need something that behaves exactly the same as BeEquivalentTo
. Starting to think like I might have to write my own extension method and use BeEquivalentTo
and expect it to fail.