public void CompareObjectsOnlyFieldsTest_Equal() { var a = new ClassWithFieldsTest { a = 1, b = "test", c = 2 }; var b = new ClassWithFieldsTest { a = 1, b = "test", c = 2 }; a.CompareObjectsOnlyFields(b).Should().BeTrue("objects have same content"); }
public void CompareObjectsOnlyFieldsTest_NullValue_Equal() { var a = new ClassWithFieldsTest { a = 1, b = null, c = 2 }; var b = new ClassWithFieldsTest { a = -1, b = null, c = 3 }; a.CompareObjectsOnlyFields(b).Should().BeFalse("objects have different content"); }