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