use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_createTransition_floatingWeekBackwards_last.
@Test
public void test_createTransition_floatingWeekBackwards_last() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransition trans = ZoneOffsetTransition.of(LocalDateTime.of(2000, Month.MARCH, 26, 1, 0), OFFSET_0200, OFFSET_0300);
assertEquals(test.createTransition(2000), trans);
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_createTransition_floatingWeek_gap_notEndOfDay.
//-----------------------------------------------------------------------
// createTransition()
//-----------------------------------------------------------------------
@Test
public void test_createTransition_floatingWeek_gap_notEndOfDay() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransition trans = ZoneOffsetTransition.of(LocalDateTime.of(2000, Month.MARCH, 26, 1, 0), OFFSET_0200, OFFSET_0300);
assertEquals(test.createTransition(2000), trans);
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_createTransition_fixedDate.
@Test
public void test_createTransition_fixedDate() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransition trans = ZoneOffsetTransition.of(LocalDateTime.of(2000, Month.MARCH, 20, 1, 0), OFFSET_0200, OFFSET_0300);
assertEquals(test.createTransition(2000), trans);
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_toString_floatingWeek_gap_notEndOfDay.
//-----------------------------------------------------------------------
// toString()
//-----------------------------------------------------------------------
@Test
public void test_toString_floatingWeek_gap_notEndOfDay() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, SUNDAY on or after MARCH 20 at 01:00 WALL, standard offset +02:00]");
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRuleSerialization method test_serialization_fixedDate.
@Test
public void test_serialization_fixedDate() throws Exception {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertSerializable(test);
}
Aggregations