public void FromNanosecondsSinceMidnight_RangeChecks() { Assert.Throws <ArgumentOutOfRangeException>(() => LocalTime.FromNanosecondsSinceMidnight(-1)); Assert.Throws <ArgumentOutOfRangeException>(() => LocalTime.FromNanosecondsSinceMidnight(NodaConstants.NanosecondsPerDay)); }
public void FromNanosecondsSinceMidnight_Valid() { Assert.AreEqual(LocalTime.Midnight, LocalTime.FromNanosecondsSinceMidnight(0)); Assert.AreEqual(LocalTime.Midnight.PlusNanoseconds(-1), LocalTime.FromNanosecondsSinceMidnight(NodaConstants.NanosecondsPerDay - 1)); }