test/java/time/test/java/time/chrono/TestServiceLoader.java
Print this page
*** 58,81 ****
*/
package test.java.time.chrono;
import static org.testng.Assert.assertNotNull;
import java.util.HashMap;
import java.util.Map;
import java.util.ServiceLoader;
! import java.time.chrono.Chronology;
import org.testng.annotations.Test;
/**
* Tests that a custom Chronology is available via the ServiceLoader.
* The CopticChronology is configured via META-INF/services/java.time.chrono.Chronology.
*/
@Test
public class TestServiceLoader {
! @Test(groups="implementation")
public void test_copticServiceLoader() {
Map<String, Chronology> chronos = new HashMap<>();
ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class, null);
for (Chronology chrono : loader) {
chronos.put(chrono.getId(), chrono);
--- 58,82 ----
*/
package test.java.time.chrono;
import static org.testng.Assert.assertNotNull;
+ import java.time.chrono.Chronology;
import java.util.HashMap;
import java.util.Map;
import java.util.ServiceLoader;
!
import org.testng.annotations.Test;
/**
* Tests that a custom Chronology is available via the ServiceLoader.
* The CopticChronology is configured via META-INF/services/java.time.chrono.Chronology.
*/
@Test
public class TestServiceLoader {
! @Test
public void test_copticServiceLoader() {
Map<String, Chronology> chronos = new HashMap<>();
ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class, null);
for (Chronology chrono : loader) {
chronos.put(chrono.getId(), chrono);