Simplify tests by asserting to an expected object
c0shea opened this issue · 0 comments
c0shea commented
Rather than have each test duplicate dozens of asserts on the various properties such as
Assert.AreEqual("JOEY", idCard.FirstName);
Assert.AreEqual("TESTER", idCard.LastName);
the test should construct the expected object like
var expectedId = new DriversLicense
{
FirstName = "JOEY",
LastName = "TESTER"
}
and pass the actual and expected objects to a method that will assert each property.