Include the property name in the error message when the property is a DateTime.
[TestMethod]
public void Should()
{
var expected = new Car {MfgDate= new DateTime(2011, 1, 1)};
var actual = new Car { MfgDate= new DateTime(2012, 2, 2) };
actual.ShouldHave().AllProperties().EqualTo(expected);
}
Actual error message from FluentAssertions
Expected <2011-01-01>, but found <2012-02-02>.
should be something like:
Expected property ***MfgDate*** <2011-01-01>, but found <2012-02-02>.
Comments: Associated with changeset 74167.
[TestMethod]
public void Should()
{
var expected = new Car {MfgDate= new DateTime(2011, 1, 1)};
var actual = new Car { MfgDate= new DateTime(2012, 2, 2) };
actual.ShouldHave().AllProperties().EqualTo(expected);
}
Actual error message from FluentAssertions
Expected <2011-01-01>, but found <2012-02-02>.
should be something like:
Expected property ***MfgDate*** <2011-01-01>, but found <2012-02-02>.
Comments: Associated with changeset 74167.