use of java.time.YearMonth in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method test_lengthOfMonth_june.
//-----------------------------------------------------------------------
// lengthOfMonth()
//-----------------------------------------------------------------------
@Test
public void test_lengthOfMonth_june() {
YearMonth test = YearMonth.of(2007, 6);
assertEquals(test.lengthOfMonth(), 30);
}
use of java.time.YearMonth in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method test_adjustDate_equal.
@Test
public void test_adjustDate_equal() {
YearMonth test = YearMonth.of(2008, 6);
LocalDate date = LocalDate.of(2008, 6, 30);
assertEquals(test.adjustInto(date), date);
}
use of java.time.YearMonth in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method test_plusMonths_long_negativeOverYear.
@Test
public void test_plusMonths_long_negativeOverYear() {
YearMonth test = YearMonth.of(2008, 6);
assertEquals(test.plusMonths(-6), YearMonth.of(2007, 12));
}
use of java.time.YearMonth in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method test_with_Year_null.
@Test(expectedExceptions = NullPointerException.class)
public void test_with_Year_null() {
YearMonth test = YearMonth.of(2008, 6);
test.with((Year) null);
}
use of java.time.YearMonth in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method factory_parse_success.
@Test(dataProvider = "goodParseData")
public void factory_parse_success(String text, YearMonth expected) {
YearMonth yearMonth = YearMonth.parse(text);
assertEquals(yearMonth, expected);
}
Aggregations