Search in sources :

Example 71 with ZoneOffsetTransitionRule

use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.

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());
}
Also used : ZoneOffsetTransitionRule(java.time.zone.ZoneOffsetTransitionRule) Test(org.junit.Test) AbstractTCKTest(tck.java.time.AbstractTCKTest)

Example 72 with ZoneOffsetTransitionRule

use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.

the class TCKZoneOffsetTransitionRule method test_equals_string_false.

@Test
public void test_equals_string_false() {
    ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300);
    assertEquals(a.equals("TZDB"), false);
}
Also used : ZoneOffsetTransitionRule(java.time.zone.ZoneOffsetTransitionRule) Test(org.junit.Test) AbstractTCKTest(tck.java.time.AbstractTCKTest)

Example 73 with ZoneOffsetTransitionRule

use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.

the class TCKZoneOffsetTransitionRule method test_hashCode_floatingWeek_overlap_endOfDay_nullDayOfWeek.

@Test
public void test_hashCode_floatingWeek_overlap_endOfDay_nullDayOfWeek() {
    ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of(Month.OCTOBER, 20, null, LocalTime.MIDNIGHT, true, TimeDefinition.WALL, OFFSET_0200, OFFSET_0300, OFFSET_0200);
    ZoneOffsetTransitionRule b = ZoneOffsetTransitionRule.of(Month.OCTOBER, 20, null, LocalTime.MIDNIGHT, true, TimeDefinition.WALL, OFFSET_0200, OFFSET_0300, OFFSET_0200);
    assertEquals(a.hashCode(), b.hashCode());
}
Also used : ZoneOffsetTransitionRule(java.time.zone.ZoneOffsetTransitionRule) Test(org.junit.Test) AbstractTCKTest(tck.java.time.AbstractTCKTest)

Example 74 with ZoneOffsetTransitionRule

use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.

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);
}
Also used : ZoneOffsetTransitionRule(java.time.zone.ZoneOffsetTransitionRule) Test(org.junit.Test) AbstractTCKTest(tck.java.time.AbstractTCKTest)

Example 75 with ZoneOffsetTransitionRule

use of java.time.zone.ZoneOffsetTransitionRule in project j2objc by google.

the class TCKZoneOffsetTransitionRule method test_createTransition_floatingWeek_overlap_endOfDay.

@Test
public void test_createTransition_floatingWeek_overlap_endOfDay() {
    ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of(Month.MARCH, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, true, TimeDefinition.WALL, OFFSET_0200, OFFSET_0300, OFFSET_0200);
    ZoneOffsetTransition trans = ZoneOffsetTransition.of(LocalDateTime.of(2000, Month.MARCH, 27, 0, 0), OFFSET_0300, OFFSET_0200);
    assertEquals(test.createTransition(2000), trans);
}
Also used : ZoneOffsetTransitionRule(java.time.zone.ZoneOffsetTransitionRule) ZoneOffsetTransition(java.time.zone.ZoneOffsetTransition) Test(org.junit.Test) AbstractTCKTest(tck.java.time.AbstractTCKTest)

Aggregations

ZoneOffsetTransitionRule (java.time.zone.ZoneOffsetTransitionRule)84 AbstractTCKTest (tck.java.time.AbstractTCKTest)72 Test (org.junit.Test)36 Test (org.testng.annotations.Test)36 ZoneOffsetTransition (java.time.zone.ZoneOffsetTransition)22 ZoneRules (java.time.zone.ZoneRules)10 Instant (java.time.Instant)2 LocalDateTime (java.time.LocalDateTime)2 OffsetDateTime (java.time.OffsetDateTime)2 ZoneId (java.time.ZoneId)2 ZoneOffset (java.time.ZoneOffset)2 ZonedDateTime (java.time.ZonedDateTime)2 TimeDefinition (java.time.zone.ZoneOffsetTransitionRule.TimeDefinition)2 ArrayList (java.util.ArrayList)2 RuntimeMXBean (java.lang.management.RuntimeMXBean)1 ThreadMXBean (java.lang.management.ThreadMXBean)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1