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

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

  MinusAdjuster p = Period.ofTime(0, 0, 62, 3);
  LocalTime t = this.TEST_12_30_40_987654321.minus(p);
  assertEquals(t, LocalTime.of(12, 29, 38, 987654318));
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(groups = { "tck" })
public void test_minus_Adjuster_positiveHours() {

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

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

  MinusAdjuster p = Period.ofTime(0, 0, 0, Long.MAX_VALUE);
  LocalTime t = this.TEST_12_30_40_987654321.minus(p);
  assertEquals(t, this.TEST_12_30_40_987654321.minusNanos(Long.MAX_VALUE));
}
项目:java8-backports    文件:TCKLocalTime.java   
@Test(groups = { "tck" })
public void test_minus_Adjuster_zero() {

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

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

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

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

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

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

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

  this.TEST_11_30_59_500_PONE.minus((MinusAdjuster) null);
}