Java 类java.time.calendrical.DateTime.PlusAdjuster 实例源码

项目:java8-backports    文件:TCKLocalTime.java   
@Test(groups = { "tck" })
public void test_plus_Adjuster_positiveHours() {

  PlusAdjuster period = MockSimplePeriod.of(7, ChronoUnit.HOURS);
  LocalTime t = this.TEST_12_30_40_987654321.plus(period);
  assertEquals(t, LocalTime.of(19, 30, 40, 987654321));
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(groups = { "tck" })
public void test_plus_Adjuster_negativeMinutes() {

  PlusAdjuster period = MockSimplePeriod.of(-25, ChronoUnit.MINUTES);
  LocalTime t = this.TEST_12_30_40_987654321.plus(period);
  assertEquals(t, LocalTime.of(12, 5, 40, 987654321));
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(groups = { "tck" })
public void test_plus_Adjuster_zero() {

  PlusAdjuster period = Period.ZERO;
  LocalTime t = this.TEST_12_30_40_987654321.plus(period);
  assertEquals(t, this.TEST_12_30_40_987654321);
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(groups = { "tck" })
public void test_plus_Adjuster_wrap() {

  PlusAdjuster p = Period.ofTime(1, 0, 0);
  LocalTime t = LocalTime.of(23, 30).plus(p);
  assertEquals(t, LocalTime.of(0, 30));
}
项目:java8-backports    文件:TCKZonedDateTime.java   
@Test(expectedExceptions = NullPointerException.class, groups = { "tck" })
public void test_plus_adjuster_null() {

  this.TEST_DATE_TIME.plus((PlusAdjuster) null);
}
项目:java8-backports    文件:TCKLocalDateTime.java   
@Test(expectedExceptions = NullPointerException.class, groups = { "tck" })
public void test_plus_adjuster_null() {

  this.TEST_2007_07_15_12_30_40_987654321.plus((PlusAdjuster) null);
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(groups = { "tck" }, expectedExceptions = DateTimeException.class)
public void test_plus_Adjuster_dateNotAllowed() {

  PlusAdjuster period = MockSimplePeriod.of(7, ChronoUnit.MONTHS);
  this.TEST_12_30_40_987654321.plus(period);
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(expectedExceptions = NullPointerException.class, groups = { "tck" })
public void test_plus_Adjuster_null() {

  this.TEST_12_30_40_987654321.plus((PlusAdjuster) null);
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(expectedExceptions = NullPointerException.class, groups = { "tck" })
public void test_plus_adjuster_null() {

  this.TEST_12_30_40_987654321.plus((PlusAdjuster) null);
}
项目:java8-backports    文件:TCKOffsetDate.java   
@Test(expectedExceptions = NullPointerException.class, groups = { "tck" })
public void test_plus_PlusAdjuster_null() {

  this.TEST_2007_07_15_PONE.plus((PlusAdjuster) null);
}
项目:java8-backports    文件:TCKOffsetTime.java   
@Test(expectedExceptions = NullPointerException.class, groups = { "tck" })
public void test_plus_PlusAdjuster_null() {

  this.TEST_11_30_59_500_PONE.plus((PlusAdjuster) null);
}