Search in sources :

Example 1 with HijrahEra

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

the class TCKHijrahChronology method data_resolve_styleByEra.

//-----------------------------------------------------------------------
// Tests for HijrahChronology resolve
//-----------------------------------------------------------------------
@DataProvider(name = "resolve_styleByEra")
Object[][] data_resolve_styleByEra() {
    Object[][] result = new Object[ResolverStyle.values().length * HijrahEra.values().length][];
    int i = 0;
    for (ResolverStyle style : ResolverStyle.values()) {
        for (HijrahEra era : HijrahEra.values()) {
            result[i++] = new Object[] { style, era };
        }
    }
    return result;
}
Also used : ResolverStyle(java.time.format.ResolverStyle) HijrahEra(java.time.chrono.HijrahEra) DataProvider(org.testng.annotations.DataProvider)

Example 2 with HijrahEra

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

the class TCKHijrahEra method test_values.

//-----------------------------------------------------------------------
// values()
//-----------------------------------------------------------------------
@Test
public void test_values() {
    List<Era> eraList = HijrahChronology.INSTANCE.eras();
    HijrahEra[] eras = HijrahEra.values();
    assertEquals(eraList.size(), eras.length);
    for (HijrahEra era : eras) {
        assertTrue(eraList.contains(era));
    }
}
Also used : Era(java.time.chrono.Era) HijrahEra(java.time.chrono.HijrahEra) HijrahEra(java.time.chrono.HijrahEra) Test(org.testng.annotations.Test)

Aggregations

HijrahEra (java.time.chrono.HijrahEra)2 Era (java.time.chrono.Era)1 ResolverStyle (java.time.format.ResolverStyle)1 DataProvider (org.testng.annotations.DataProvider)1 Test (org.testng.annotations.Test)1