Package org.jclouds.cloudservers.domain

Examples of org.jclouds.cloudservers.domain.Flavor


      Set<Flavor> response = client.listFlavors(withDetails());
      assert null != response;
      long flavorCount = response.size();
      assertTrue(flavorCount >= 0);
      for (Flavor flavor : response) {
         Flavor newDetails = client.getFlavor(flavor.getId());
         assertEquals(flavor, newDetails);
      }
   }
View Full Code Here


* Tests behavior of {@code ParseFlavorFromJsonResponse}
*/
@Test(groups = "unit")
public class ParseFlavorFromJsonResponseTest {
   public void test() {
      Flavor response = parseFlavor();

      String json = new Gson().toJson(response);

      assertEquals(json, "{\"id\":1,\"name\":\"256 MB Server\",\"disk\":10,\"ram\":256}");
   }
View Full Code Here

      InputStream is = ParseFlavorFromJsonResponseTest.class.getResourceAsStream("/test_get_flavor_details.json");

      UnwrapOnlyJsonValue<Flavor> parser = i.getInstance(Key.get(new TypeLiteral<UnwrapOnlyJsonValue<Flavor>>() {
      }));
      Flavor response = parser.apply(HttpResponse.builder().statusCode(200).message("ok").payload(is).build());
      return response;
   }
View Full Code Here

TOP

Related Classes of org.jclouds.cloudservers.domain.Flavor

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.