Package org.jclouds.location.suppliers.all

Examples of org.jclouds.location.suppliers.all.JustProvider


public class RegionToLocationTest {

   @Test
   public void testConvertRegion() {
      DigitalOceanProviderMetadata metadata = new DigitalOceanProviderMetadata();
      JustProvider locationsSupplier = new JustProvider(metadata.getId(), Suppliers.<URI> ofInstance(URI
            .create(metadata.getEndpoint())), ImmutableSet.<String> of());

      Region region = new Region(1, "Region 1", "reg1");
      Location expected = new LocationBuilder().id("reg1").description("1/Region 1")
            .parent(getOnlyElement(locationsSupplier.get())).scope(LocationScope.REGION).build();

      RegionToLocation function = new RegionToLocation(locationsSupplier);
      assertEquals(function.apply(region), expected);
   }
View Full Code Here


public class RegionToLocationTest {

   @Test
   public void testConvertRegion() {
      DigitalOceanProviderMetadata metadata = new DigitalOceanProviderMetadata();
      JustProvider locationsSupplier = new JustProvider(metadata.getId(), Suppliers.<URI> ofInstance(URI
            .create(metadata.getEndpoint())), ImmutableSet.<String> of());

      Region region = new Region(1, "Region 1", "reg1");
      Location expected = new LocationBuilder().id("reg1").description("1/Region 1")
            .parent(getOnlyElement(locationsSupplier.get())).scope(LocationScope.REGION).build();

      RegionToLocation function = new RegionToLocation(locationsSupplier);
      assertEquals(function.apply(region), expected);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.location.suppliers.all.JustProvider

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.