It would be nice if you could assert that a DateTime value is close to another DateTime value. This can be useful for example when a database truncates datetime values. The acceptable difference in time could be an optional parameter with a default value of, say, 20 ms.
The syntx could be:
time.Should().BeCloseTo(otherTime); // succeeds if time is within 20 ms of otherTime
time.Should().BeCloseTo(otherTime, 30); // succeeds if time is within 30 ms of otherTime
Comments: Associated with changeset 76836.
The syntx could be:
time.Should().BeCloseTo(otherTime); // succeeds if time is within 20 ms of otherTime
time.Should().BeCloseTo(otherTime, 30); // succeeds if time is within 30 ms of otherTime
Comments: Associated with changeset 76836.