use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRuleSerialization method test_serialization_unusualTime.
@Test
public void test_serialization_unusualTime() throws Exception {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.WEDNESDAY, LocalTime.of(13, 34, 56), false, TimeDefinition.STANDARD, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertSerializable(test);
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_equals_dayOfWeekDifferent.
@Test
public void test_equals_dayOfWeekDifferent() {
ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransitionRule b = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SATURDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(a.equals(a), true);
assertEquals(a.equals(b), false);
assertEquals(b.equals(a), false);
assertEquals(b.equals(b), true);
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_hashCode_floatingWeekBackwards.
@Test
public void test_hashCode_floatingWeekBackwards() {
ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransitionRule b = ZoneOffsetTransitionRule.of(Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(a.hashCode(), b.hashCode());
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_toString_fixedDate.
@Test
public void test_toString_fixedDate() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, MARCH 20 at 01:00 STANDARD, standard offset +02:00]");
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_equals_timeDefinitionDifferent.
@Test
public void test_equals_timeDefinitionDifferent() {
ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransitionRule b = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.STANDARD, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(a.equals(a), true);
assertEquals(a.equals(b), false);
assertEquals(b.equals(a), false);
assertEquals(b.equals(b), true);
}
Aggregations