use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_equals_dayOfWeekDifferentNull.
@Test
public void test_equals_dayOfWeekDifferentNull() {
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, null, 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_equals_null_false.
@Test
public void test_equals_null_false() {
ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(a.equals(null), false);
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_toString_floatingWeek_overlap_endOfDay.
@Test
public void test_toString_floatingWeek_overlap_endOfDay() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.OCTOBER, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, true, TimeDefinition.WALL, OFFSET_0200, OFFSET_0300, OFFSET_0200);
assertEquals(test.toString(), "TransitionRule[Overlap +03:00 to +02:00, SUNDAY on or after OCTOBER 20 at 24:00 WALL, standard offset +02:00]");
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_getters_floatingWeekBackwards.
@Test
public void test_getters_floatingWeekBackwards() throws Exception {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(test.getMonth(), Month.MARCH);
assertEquals(test.getDayOfMonthIndicator(), -1);
assertEquals(test.getDayOfWeek(), DayOfWeek.SUNDAY);
assertEquals(test.getLocalTime(), TIME_0100);
assertEquals(test.isMidnightEndOfDay(), false);
assertEquals(test.getTimeDefinition(), TimeDefinition.WALL);
assertEquals(test.getStandardOffset(), OFFSET_0200);
assertEquals(test.getOffsetBefore(), OFFSET_0200);
assertEquals(test.getOffsetAfter(), OFFSET_0300);
}
use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_equals_standardOffsetDifferent.
@Test
public void test_equals_standardOffsetDifferent() {
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.WALL, OFFSET_0300, 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