@@ -0,0 +1,1585 @@
+/*%0A * CREDIT SUISSE IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU%0A * ACCEPT ALL OF THE TERMS CONTAINED IN THIS AGREEMENT. PLEASE READ THE TERMS AND CONDITIONS OF THIS%0A * AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF%0A * THE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY IT, SELECT THE %22DECLINE%22 BUTTON AT THE%0A * BOTTOM OF THIS PAGE. Specification: JSR-354 Money and Currency API (%22Specification%22) Copyright%0A * (c) 2012-2013, Credit Suisse All rights reserved.%0A */%0Apackage org.javamoney.lib.incubator;%0A%0Aimport java.util.Collection;%0Aimport java.util.Locale;%0A%0Aimport javax.money.spi.Bootstrap;%0Aimport javax.money.spi.CurrencyProviderSpi;%0Aimport javax.money.spi.RoundingProviderSpi;%0A%0Aimport org.testng.annotations.Test;%0A%0Aimport static org.testng.Assert.*;%0A%0A/**%0A * Tests for %7B@link javax.money.spi.Bootstrap%7D.%0A */%0A@SuppressWarnings(%22unchecked%22)%0A@Test%0Apublic class BootstrapTest %7B%0A%0A    @Test%0A    public void testGetServices() throws Exception %7B%0A    %09Collection%3CCurrencyProviderSpi%3E services = Collection.class.cast(Bootstrap.getServices(CurrencyProviderSpi.class));%0A        assertNotNull(services);%0A        assertFalse(services.isEmpty());%0A    %7D%0A%0A    @Test%0A    public void testGetService() throws Exception %7B%0A    %09RoundingProviderSpi rounding = Bootstrap.getService(RoundingProviderSpi.class);%0A        assertNotNull(rounding);%0A        //assertTrue(num.equals(5));%0A    %7D%0A%0A    @Test%0A    public void testGetService_BadCase() throws Exception %7B%0A        assertNull(Bootstrap.getService(Locale.class));%0A    %7D%0A%7D%0A

Create Library-Incubator