use of java.time.OffsetTime in project jdk8u_jdk by JetBrains.
the class TCKOffsetTime method factory_ofInstant_maxYear.
//-----------------------------------------------------------------------
@Test
public void factory_ofInstant_maxYear() {
OffsetTime test = OffsetTime.ofInstant(Instant.MAX, ZoneOffset.UTC);
assertEquals(test.getHour(), 23);
assertEquals(test.getMinute(), 59);
assertEquals(test.getSecond(), 59);
assertEquals(test.getNano(), 999_999_999);
}
use of java.time.OffsetTime in project cxf by apache.
the class JavaTimeTypesParamConverterProviderTest method offsetTime.
@Test
public void offsetTime() {
OffsetTime offsetTime = OffsetTime.of(10, 33, 24, 5, ZoneOffset.ofHours(2));
ParamConverter<OffsetTime> converter = (ParamConverter<OffsetTime>) provider.getConverter(offsetTime.getClass(), offsetTime.getClass(), offsetTime.getClass().getAnnotations());
Assert.assertEquals(offsetTime, converter.fromString(converter.toString(offsetTime)));
}
use of java.time.OffsetTime in project drools by kiegroup.
the class CodeFunctionTest method invokeOffsetTime.
@Test
public void invokeOffsetTime() {
final OffsetTime offsetTime = OffsetTime.now();
FunctionTestUtil.assertResult(codeFunction.invoke(offsetTime), "time( \"" + TimeFunction.FEEL_TIME.format(offsetTime) + "\" )");
}
use of java.time.OffsetTime in project drools by kiegroup.
the class StringFunctionTest method invokeOffsetTime.
@Test
public void invokeOffsetTime() {
final OffsetTime offsetTime = OffsetTime.now();
FunctionTestUtil.assertResult(stringFunction.invoke(offsetTime), TimeFunction.FEEL_TIME.format(offsetTime));
}
Aggregations