public void AreSameSecondDoesNotRoundUp() { DateTime dt1 = new DateTime(2006, 1, 2, 3, 4, 5, 999, DateTimeKind.Utc); DateTime dt2 = new DateTime(2006, 1, 2, 3, 4, 6, 0, DateTimeKind.Utc); Assert.IsTrue(!DateTimeUtility.AreSameSecond(dt1, dt2)); }
public void AreSameSecondClearsMilliseconds() { DateTime dt1 = new DateTime(2006, 1, 2, 3, 4, 5, 1, DateTimeKind.Utc); DateTime dt2 = new DateTime(2006, 1, 2, 3, 4, 5, 999, DateTimeKind.Utc); Assert.IsTrue(DateTimeUtility.AreSameSecond(dt1, dt2)); }