use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.
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);
}
use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.
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 j2objc by google.
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);
}
use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.
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 j2objc by google.
the class TCKZoneOffsetTransitionRule method test_toString_floatingWeekBackwards_secondLast.
@Test
public void test_toString_floatingWeekBackwards_secondLast() {
ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, -2, 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 before last day minus 1 of MARCH at 01:00 WALL, standard offset +02:00]");
}
Aggregations