Package org.jclouds.softlayer.domain

Examples of org.jclouds.softlayer.domain.Address$Builder


      Set<Datacenter> datacenters = cloudServerProductPackage.getDatacenters();
      assert datacenters.size() == expected.size() : datacenters;
      assertTrue(datacenters.containsAll(expected));

      for (Datacenter dataCenter : datacenters) {
         Address address = dataCenter.getLocationAddress();
         assertNotNull(address);
         checkAddress(address);
      }
   }
View Full Code Here


   static DatacenterToLocation function = new DatacenterToLocation(new JustProvider("softlayer", Suppliers
            .ofInstance(URI.create("foo")), ImmutableSet.<String> of()));

   @Test
   public void testDatacenterToLocation() {
      Address address = Address.builder().country("US").state("TX").description("This is Texas!").build();

      Datacenter datacenter = Datacenter.builder().id(1).longName("Texas Datacenter").locationAddress(address).build();

      Location location = function.apply(datacenter);
View Full Code Here

      assertEquals(iso3166Codes.size(), 0);
   }

   @Test
   public void testGetIso3166CodeCountryOnly() {
      Address address = Address.builder().country("US").description("This is North America!").build();

      Datacenter datacenter = Datacenter.builder().id(1).longName("Nowhere").locationAddress(address).build();

      Location location = function.apply(datacenter);
View Full Code Here

      assertTrue(iso3166Codes.contains("US"));
   }

   @Test
   public void testGetIso3166CodeWhitespaceTrimmer() {
      Address address = Address.builder().country(" US ").state("  TX  ").description("This is spaced out Texas")
            .build();

      Datacenter datacenter = Datacenter.builder().id(1).longName("Nowhere").locationAddress(address).build();

      Location location = function.apply(datacenter);
View Full Code Here

      Set<Datacenter> expected = builder.build();

      assertEquals(response.size(), expected.size());

      for (Datacenter datacenter : response) {
         Address address = datacenter.getLocationAddress();
         if (address != null) checkAddress(address);
      }
   }
View Full Code Here

   static DatacenterToLocation function = new DatacenterToLocation(new JustProvider("softlayer", Suppliers
            .ofInstance(URI.create("foo")), ImmutableSet.<String> of()));

   @Test
   public void testDatacenterToLocation() {
      Address address = Address.builder().country("US").state("TX").description("This is Texas!").build();

      Datacenter datacenter = Datacenter.builder().id(1).name("Texas").longName("Texas Datacenter")
              .locationAddress(address).build();

      Location location = function.apply(datacenter);
View Full Code Here

      assertEquals(iso3166Codes.size(), 0);
   }

   @Test
   public void testGetIso3166CodeCountryOnly() {
      Address address = Address.builder().country("US").description("This is North America!").build();

      Datacenter datacenter = Datacenter.builder().id(1).name("Nowhere").longName("No where").locationAddress(address)
              .build();

      Location location = function.apply(datacenter);
View Full Code Here

      assertTrue(iso3166Codes.contains("US"));
   }

   @Test
   public void testGetIso3166CodeWhitespaceTrimmer() {
      Address address = Address.builder().country(" US ").state("  TX  ").description("This is spaced out Texas")
            .build();

      Datacenter datacenter = Datacenter.builder().id(1).name("NoWhere").longName("Nowhere").locationAddress(address)
             .build();
View Full Code Here

TOP

Related Classes of org.jclouds.softlayer.domain.Address$Builder

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.