Package org.jclouds.cloudsigma2.functions.internal

Examples of org.jclouds.cloudsigma2.functions.internal.ParseDiscounts$ToPagedIterable


                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/balance.json", MediaType.APPLICATION_JSON))
                  .build());

      AccountBalance result = api.getAccountBalance();
      assertNotNull(result);
   }
View Full Code Here


                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/balance.json", MediaType.APPLICATION_JSON))
                  .build());

      AccountBalance result = api.getAccountBalance();
      assertNotNull(result);
   }
View Full Code Here

   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
      checkArgument(input instanceof CreateSubscriptionRequest,
            "this binder is only valid for CreateSubscriptionRequest!");
      CreateSubscriptionRequest create = CreateSubscriptionRequest.class.cast(input);
      JsonObject subscriptionObject = subscriptionRequestJsonObjectFunction.apply(create);

      request.setPayload(subscriptionObject.toString());
      request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
      return request;
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/currentusage.json", MediaType.APPLICATION_JSON))
                  .build());

      CurrentUsage result = api.getCurrentUsage();
      assertNotNull(result);
   }
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/currentusage.json", MediaType.APPLICATION_JSON))
                  .build());

      CurrentUsage result = api.getCurrentUsage();
      assertNotNull(result);
   }
View Full Code Here

   }

   @Override
   public <R extends HttpRequest> R bindToRequest(R request, Object payload) {
      checkArgument(payload instanceof DriveInfo, "this binder is only valid for DriveInfo!");
      DriveInfo create = DriveInfo.class.cast(payload);
      JsonObject driveJson = createDriveRequestToJson.apply(create);

      request.setPayload(driveJson.toString());
      request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
      return request;
View Full Code Here

      }
   }

   @Test
   public void testCreateDrive() throws Exception {
      DriveInfo newDrive = new DriveInfo.Builder()
            .name("test drive")
            .size(new BigInteger("2073741824"))
            .media(MediaType.DISK)
            .build();
      createdDrive = api.createDrive(newDrive);
View Full Code Here

      }
   }

   @Test(dependsOnMethods = {"testCreateDrive"})
   public void testEditDrive() throws Exception {
      DriveInfo editedDrive = new DriveInfo.Builder()
            .name("Edited Drive")
            .size(createdDrive.getSize())
            .media(MediaType.DISK)
            .build();
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/drives-detail.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.getDriveInfo(uuid);
      assertNotNull(result);
   }
View Full Code Here

                  .build(),
            responseBuilder()
                  .payload(payloadFromResourceWithContentType("/drives-single.json", MediaType.APPLICATION_JSON))
                  .build());

      DriveInfo result = api.createDrive(new DriveInfo.Builder()
            .media(org.jclouds.cloudsigma2.domain.MediaType.DISK)
            .name("test_drive_0")
            .size(new BigInteger("1024000000"))
            .allowMultimount(false)
            .build());
View Full Code Here

TOP

Related Classes of org.jclouds.cloudsigma2.functions.internal.ParseDiscounts$ToPagedIterable

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.