I have a method which tests a unit that changes state of the layout object that is a POCO:
[TestMethod]
public void A_Test_Method()
{
// Arrange
const double adjustmentValue = 50;
var expectedLayout = CreateDefaultLayout();
... // set some values
var actualLayout = CreateDefaultLayout();
...
var runtimeHelper = new LayoutRuntimeHelper(actualLayout);
// Act
runtimeHelper.SetPrintVerticalAdjustment(actualLayout.Print.VerticalAdjustment.Orientation, adjustmentValue);
// Assert
Assert.AreEqual(expectedLayout, actualLayout);
}
Note: the ToString() method is overridden so it prints entire object like JSON, not just its type. Same happens with Equals().
The problem is that layout objects are simply big, so the test output becomes huge as well where I have to find the differences between those objects. So, how to tell the testing framework to output only the differences?