Package org.jclouds.softlayer.domain

Examples of org.jclouds.softlayer.domain.ProductItem$ConcreteBuilder


   public void testItemCallGetsCategory() {
      ProductItemPrice price = ProductItemPrice.builder().id(1)
                                                         .categories(category)
                                                         .item(item)
                                                         .build();
      ProductItem newItem = item().apply(price);
      assertEquals(newItem.getCategories(), ImmutableSet.of(category));
   }
View Full Code Here


   }

   @Test
   public void testItemCallNoCategoryOnPrice() {

      ProductItem item1 = item.toBuilder().categories(ImmutableSet.of(category)).build();

      ProductItemPrice price = ProductItemPrice.builder().id(1)
                                                         .item(item1)
                                                         .build();
      ProductItem newItem = item().apply(price);
      assertEquals(newItem.getCategories(), ImmutableSet.of(category));
   }
View Full Code Here

      ProductItemCategory category2 = ProductItemCategory.builder()
            .id(12)
            .categoryCode("new category")
            .build();

      ProductItem item1 = item.toBuilder().categories(ImmutableSet.of(category2)).build();

      ProductItemPrice price = ProductItemPrice.builder().id(1)
                                                         .categories(category)
                                                         .item(item1)
                                                         .build();
      ProductItem newItem = item().apply(price);
      assertEquals(newItem.getCategories(), ImmutableSet.of(category2));
   }
View Full Code Here

   }

   @Test
   public void testHardwareId() {
      ProductItem item1 = ProductItem.builder().prices(ProductItemPrice.builder().id(123).build()).build();
      ProductItem item2 = ProductItem.builder().prices(ProductItemPrice.builder().id(456).build()).build();
      ProductItem item3 = ProductItem.builder().prices(ProductItemPrice.builder().id(789).build()).build();

      String id = hardwareId().apply(ImmutableList.of(item1, item2, item3));
      assertEquals("123,456,789", id);
   }
View Full Code Here

     assertEquals(100F, volumes.get(0).getSize());
   }

   @Test
   public void testHardwareWithTwoDisks() {
      ProductItem localVolumeItem = ProductItem.builder().id(4).description("25 GB").capacity(25F).prices(
            ProductItemPrice.builder().id(987).build()).categories(
            ProductItemCategory.builder().categoryCode("guest_disk1").build()).build();

      Hardware hardware = toHardware.apply(ImmutableSet.of(cpuItem, ramItem, volumeItem,localVolumeItem));
View Full Code Here

TOP

Related Classes of org.jclouds.softlayer.domain.ProductItem$ConcreteBuilder

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.