Package org.jclouds.location.suppliers

Examples of org.jclouds.location.suppliers.LocationIdToIso3166CodesSupplier


      assertEquals(fn.get(), ImmutableMap.<String, Set<String>> of());
   }

   public void testIsoCodesWhenRegionsAndZonesBoundWithIsoCodes() {

      LocationIdToIso3166CodesSupplier fn = createWithValue(ImmutableMap.<String, String> of(
            "jclouds.regions", "us-east", "jclouds.region.us-east.iso3166-codes", "US", "jclouds.zones", "us-easta",
            "jclouds.zone.us-easta.iso3166-codes", "US-CA"));

      assertEquals(Maps.transformValues(fn.get(), Suppliers.<Set<String>> supplierFunction()), ImmutableMap
               .<String, Set<String>> of("us-east", ImmutableSet.of("US"), "us-easta", ImmutableSet.of("US-CA")));
   }
View Full Code Here


      assertEquals(Maps.transformValues(fn.get(), Suppliers.<Set<String>> supplierFunction()), ImmutableMap
               .<String, Set<String>> of("us-east", ImmutableSet.of("US"), "us-easta", ImmutableSet.of("US-CA")));
   }

   private LocationIdToIso3166CodesSupplier createWithValue(final ImmutableMap<String, String> value) {
      LocationIdToIso3166CodesSupplier fn = Guice.createInjector(new AbstractModule() {
         @Provides
         Function<Predicate<String>, Map<String, String>> provide() {
            return new Function<Predicate<String>, Map<String, String>>() {

               @Override
View Full Code Here

TOP

Related Classes of org.jclouds.location.suppliers.LocationIdToIso3166CodesSupplier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.