Search in sources :

Example 26 with HijrahDate

use of java.time.chrono.HijrahDate in project jdk8u_jdk by JetBrains.

the class TestUmmAlQuraChronology method test_epochDays.

// Test to verify the number of epoch days of a date instance
@Test(dataProvider = "epochDays")
public void test_epochDays(int y, long epoch) {
    HijrahDate date = HijrahDate.of(y, 1, 1);
    assertEquals(date.toEpochDay(), epoch);
}
Also used : HijrahDate(java.time.chrono.HijrahDate) Test(org.testng.annotations.Test)

Aggregations

HijrahDate (java.time.chrono.HijrahDate)26 Test (org.testng.annotations.Test)25 TemporalField (java.time.temporal.TemporalField)11 HashMap (java.util.HashMap)11 DateTimeException (java.time.DateTimeException)6 HijrahChronology (java.time.chrono.HijrahChronology)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataOutputStream (java.io.DataOutputStream)1 OffsetDateTime (java.time.OffsetDateTime)1 ZonedDateTime (java.time.ZonedDateTime)1 ChronoZonedDateTime (java.time.chrono.ChronoZonedDateTime)1 DateTimeFormatter (java.time.format.DateTimeFormatter)1 ValueRange (java.time.temporal.ValueRange)1 AbstractTCKTest (tck.java.time.AbstractTCKTest)1