case I am working on is - what is best solution to compare two objects with properties but excluding members with null values.
Ex.
objectA.prop1 = "value1";
objectA.prop2 = "value2";
objectA.prop3 = "value3";
expectedObjectB.prop1 = null;
expectedObjectB.prop2 = "value2";
expectedObjectB.prop3 = null;
objectA.Should().BeEquivalentTo(expectedObjectB);
It compares all properties one-to-one. How to make it compare only prop2 in that case and ignore other? Should I use Exclude method?