ShouldBeEquivalentTo failing for equivalent objects when the subject is a DateTime
问题 What I'm trying to do I've just set up a test to ensure that a NodaTime LocalDateTime is mapped to a .NET DateTime , retaining the same date and time values. I'm using FluentAssertions' ShouldBeEquivalentTo method to compare the corresponding property values. [TestClass] public class LocalDateTimeMapping { [TestMethod] public void RetainsComponentValues() { var nodatimeTime = new LocalDateTime(); var dotnetTime = nodatimeTime.ToDateTimeUnspecified(); dotnetTime.ShouldBeEquivalentTo