use of java.time.zone.ZoneOffsetTransitionRule in project jdk8u_jdk by JetBrains.
the class TCKZoneOffsetTransitionRule method test_hashCode_floatingWeek_gap_notEndOfDay.
//-----------------------------------------------------------------------
// hashCode()
//-----------------------------------------------------------------------
@Test
public void test_hashCode_floatingWeek_gap_notEndOfDay() {
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_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_equals_localTimeDifferent.
@Test
public void test_equals_localTimeDifferent() {
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, LocalTime.MIDNIGHT, 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_createTransition_floatingWeekBackwards_seventhLast.
@Test
public void test_createTransition_floatingWeekBackwards_seventhLast() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, -7, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransition trans = ZoneOffsetTransition.of(LocalDateTime.of(2000, Month.MARCH, 19, 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_hashCode_fixedDate.
@Test
public void test_hashCode_fixedDate() {
ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD, OFFSET_0200, OFFSET_0200, OFFSET_0300);
ZoneOffsetTransitionRule b = ZoneOffsetTransitionRule.of(Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD, 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_getters_fixedDate.
@Test
public void test_getters_fixedDate() throws Exception {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
assertEquals(test.getMonth(), Month.MARCH);
assertEquals(test.getDayOfMonthIndicator(), 20);
assertEquals(test.getDayOfWeek(), null);
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);
}
Aggregations