use of java.time.format.DateTimeFormatter in project jdk8u_jdk by JetBrains.
the class TCKMonthDay method factory_parse_formatter_nullText.
@Test(expectedExceptions = NullPointerException.class)
public void factory_parse_formatter_nullText() {
DateTimeFormatter f = DateTimeFormatter.ofPattern("M d");
MonthDay.parse((String) null, f);
}
use of java.time.format.DateTimeFormatter in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method factory_parse_formatter_nullText.
@Test(expectedExceptions = NullPointerException.class)
public void factory_parse_formatter_nullText() {
DateTimeFormatter f = DateTimeFormatter.ofPattern("y M");
YearMonth.parse((String) null, f);
}
use of java.time.format.DateTimeFormatter in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method test_format_formatter.
//-----------------------------------------------------------------------
// format(DateTimeFormatter)
//-----------------------------------------------------------------------
@Test
public void test_format_formatter() {
DateTimeFormatter f = DateTimeFormatter.ofPattern("y M");
String t = YearMonth.of(2010, 12).format(f);
assertEquals(t, "2010 12");
}
use of java.time.format.DateTimeFormatter in project jdk8u_jdk by JetBrains.
the class TCKYearMonth method factory_parse_formatter.
//-----------------------------------------------------------------------
// parse(DateTimeFormatter)
//-----------------------------------------------------------------------
@Test
public void factory_parse_formatter() {
DateTimeFormatter f = DateTimeFormatter.ofPattern("y M");
YearMonth test = YearMonth.parse("2010 12", f);
assertEquals(test, YearMonth.of(2010, 12));
}
use of java.time.format.DateTimeFormatter in project jdk8u_jdk by JetBrains.
the class TCKDateTimeFormatter method test_print_TemporalAppendable_nullAppendable.
@Test(expectedExceptions = NullPointerException.class)
public void test_print_TemporalAppendable_nullAppendable() throws Exception {
DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withDecimalStyle(DecimalStyle.STANDARD);
test.formatTo(LocalDate.of(2008, 6, 30), (Appendable) null);
}
Aggregations