Examples of AzureManagementApi


Examples of org.jclouds.azure.management.AzureManagementApi

   public void testListWhenResponseIs404() throws Exception {

      HttpResponse listResponse = HttpResponse.builder().statusCode(404).build();

      AzureManagementApi apiWhenDontExist = requestSendsResponse(
            list, listResponse);

      assertEquals(apiWhenDontExist.getLocationApi().list(), ImmutableSet.of());
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

   public void testListWhenResponseIs2xx() throws Exception {

      HttpResponse listResponse = HttpResponse.builder().statusCode(200)
            .payload(payloadFromResourceWithContentType("/hostedservices.xml", "application")).build();

      AzureManagementApi apiWhenExist = requestSendsResponse(
            list, listResponse);

      assertEquals(apiWhenExist.getHostedServiceApi().list().toString(), new ListHostedServicesTest().expected().toString());
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

   public void testListWhenResponseIs404() throws Exception {

      HttpResponse listResponse = HttpResponse.builder().statusCode(404).build();

      AzureManagementApi apiWhenDontExist = requestSendsResponse(
            list, listResponse);

      assertEquals(apiWhenDontExist.getHostedServiceApi().list(), ImmutableSet.of());
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

           
      HttpResponse createResponse = HttpResponse.builder()
                                                .addHeader("x-ms-request-id", "171f77920784404db208200702e59227")
                                                .statusCode(201).build();

      AzureManagementApi apiWhenExist = requestSendsResponse(create, createResponse);

      assertEquals(
               apiWhenExist.getHostedServiceApi().createServiceWithLabelInLocation(SERVICE_NAME, "service mine",
                        "West US"), "171f77920784404db208200702e59227");
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

      HttpResponse createResponse = HttpResponse.builder()
                                                .addHeader("x-ms-request-id", "171f77920784404db208200702e59227")
                                                .statusCode(201).build();
     
      AzureManagementApi apiWhenExist = requestSendsResponse(create, createResponse);
     
      assertEquals(
               apiWhenExist.getHostedServiceApi().createServiceWithLabelInLocation(SERVICE_NAME, "service mine",
                        "West US",
                        description("my description").extendedProperties(ImmutableMap.of("Role", "Production"))),
               "171f77920784404db208200702e59227");
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

  
   public void testGetWhenResponseIs2xx() throws Exception {
      HttpResponse getResponse = HttpResponse.builder().statusCode(200)
               .payload(payloadFromResourceWithContentType("/hostedservice.xml", "application")).build();

      AzureManagementApi apiWhenExist = requestSendsResponse(get, getResponse);

      assertEquals(apiWhenExist.getHostedServiceApi().get(SERVICE_NAME).toString(), new GetHostedServiceTest().expected().toString());
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

   }

   public void testGetWhenResponseIs404() throws Exception {
      HttpResponse getResponse = HttpResponse.builder().statusCode(404).build();

      AzureManagementApi apiWhenDontExist = requestSendsResponse(get, getResponse);

      assertNull(apiWhenDontExist.getHostedServiceApi().get(SERVICE_NAME));
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

  
   public void testGetDetailsWhenResponseIs2xx() throws Exception {
      HttpResponse getResponse = HttpResponse.builder().statusCode(200)
               .payload(payloadFromResourceWithContentType("/hostedservice_details.xml", "application")).build();

      AzureManagementApi apiWhenExist = requestSendsResponse(getDetails, getResponse);

      assertEquals(apiWhenExist.getHostedServiceApi().getDetails(SERVICE_NAME).toString(), new GetHostedServiceDetailsTest().expected().toString());
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

   }

   public void testGetDetailsWhenResponseIs404() throws Exception {
      HttpResponse getResponse = HttpResponse.builder().statusCode(404).build();

      AzureManagementApi apiWhenDontExist = requestSendsResponse(getDetails, getResponse);

      assertNull(apiWhenDontExist.getHostedServiceApi().getDetails(SERVICE_NAME));
   }
View Full Code Here

Examples of org.jclouds.azure.management.AzureManagementApi

  
   public void testGetWhenResponseIs2xx() throws Exception {
      HttpResponse getResponse = HttpResponse.builder().statusCode(200)
               .payload(payloadFromResourceWithContentType("/operation.xml", "application")).build();

      AzureManagementApi apiWhenExist = requestSendsResponse(get, getResponse);

      assertEquals(apiWhenExist.getOperationApi().get(REQUEST_ID).toString(), new GetOperationTest().expected().toString());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.