public void PlusHours_Overflow(int year, int month, int day, long hours)
 {
     TestHelper.AssertOverflow(new LocalDateTime(year, month, day, 0, 0).PlusHours, hours);
 }
Beispiel #2
0
 public void PlusOffset_Overflow()
 {
     TestHelper.AssertOverflow(Instant.MinValue.Plus, Offset.FromSeconds(-1));
     TestHelper.AssertOverflow(Instant.MaxValue.Plus, Offset.FromSeconds(1));
 }
Beispiel #3
0
        public void PlusDays_OutOfRange(int year, int month, int day, int days)
        {
            var start = new LocalDate(year, month, day);

            TestHelper.AssertOverflow(start.PlusDays, days);
        }
Beispiel #4
0
 public void PlusDuration_Overflow()
 {
     TestHelper.AssertOverflow(Instant.MinValue.Plus, -Duration.Epsilon);
     TestHelper.AssertOverflow(Instant.MaxValue.Plus, Duration.Epsilon);
 }
Beispiel #5
0
 public void ToDateTimeOffset_WithOverflow()
 {
     TestHelper.AssertOverflow(() => Instant.MinValue.ToDateTimeOffset());
 }