Package org.jclouds.ultradns.ws

Examples of org.jclouds.ultradns.ws.UltraDNSWSApi


   HttpResponse updateResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/rr_updated.xml", "application/xml")).build();

   public void testUpdateWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(update, updateResponse);
      success.getResourceRecordApiForZone("jclouds.org.").update("04053D8E57C7931F", record);
   }
View Full Code Here


   HttpResponse listResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/records.xml", "application/xml")).build();
  
   public void testListWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(list, listResponse);

      assertEquals(
            success.getResourceRecordApiForZone("jclouds.org.").list().toString(),
            new GetResourceRecordsOfResourceRecordResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse zoneDoesntExist = HttpResponse.builder().message("Server Error").statusCode(INTERNAL_SERVER_ERROR.getStatusCode())
         .payload(payloadFromResource("/zone_doesnt_exist.xml")).build();
  
   @Test(expectedExceptions = ResourceNotFoundException.class, expectedExceptionsMessageRegExp = "Zone does not exist in the system.")
   public void testListWhenResponseError1801() {
      UltraDNSWSApi notFound = requestSendsResponse(list, zoneDoesntExist);
      notFound.getResourceRecordApiForZone("jclouds.org.").list();
   }
View Full Code Here

         .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01")
         .addHeader(HOST, "ultra-api.ultradns.com:8443")
         .payload(payloadFromResourceWithContentType("/list_records_by_name.xml", "application/xml")).build();
  
   public void testListByNameWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(listByName, listResponse);

      assertEquals(
            success.getResourceRecordApiForZone("jclouds.org.").listByName("www.jclouds.org.").toString(),
            new GetResourceRecordsOfResourceRecordResponseTest().expected().toString());
   }
View Full Code Here

         .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01")
         .addHeader(HOST, "ultra-api.ultradns.com:8443")
         .payload(payloadFromResourceWithContentType("/list_records_by_name_and_type.xml", "application/xml")).build();
  
   public void testListByNameAndTypeWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(listByNameAndType, listResponse);

      assertEquals(success.getResourceRecordApiForZone("jclouds.org.").listByNameAndType("www.jclouds.org.", 1)
            .toString(), new GetResourceRecordsOfResourceRecordResponseTest().expected().toString());
     
      assertEquals(
            success.getResourceRecordApiForZone("jclouds.org.")
                  .listByNameAndType("www.jclouds.org.", 1).toString(),
            new GetResourceRecordsOfResourceRecordResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse deleteResponse = HttpResponse.builder().statusCode(404)
         .payload(payloadFromResourceWithContentType("/rr_deleted.xml", "application/xml")).build();

   public void testDeleteWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(delete, deleteResponse);
      success.getZoneApi().delete("04053D8E57C7931F");
   }
View Full Code Here

   HttpResponse rrDoesntExist = HttpResponse.builder().message("Server Error").statusCode(INTERNAL_SERVER_ERROR.getStatusCode())
         .payload(payloadFromResource("/rr_doesnt_exist.xml")).build();
  
   public void testDeleteWhenResponseRRNotFound() {
      UltraDNSWSApi notFound = requestSendsResponse(delete, rrDoesntExist);
      notFound.getZoneApi().delete("04053D8E57C7931F");
   }
View Full Code Here

   HttpResponse listByAccountResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/zones.xml", "application/xml")).build();

   public void testListByAccountWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(listByAccount, listByAccountResponse);

      assertEquals(
            success.getZoneApi().listByAccount("AAAAAAAAAAAAAAAA").toString(),
            new GetZonesOfAccountResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse accountDoesntExist = HttpResponse.builder().message("Server Error").statusCode(INTERNAL_SERVER_ERROR.getStatusCode())
         .payload(payloadFromResource("/account_doesnt_exist.xml")).build();
  
   @Test(expectedExceptions = ResourceNotFoundException.class, expectedExceptionsMessageRegExp = "Account not found in the system. ID: AAAAAAAAAAAAAAAA")
   public void testListByAccountWhenResponseError2401() {
      UltraDNSWSApi notFound = requestSendsResponse(listByAccount, accountDoesntExist);
      notFound.getZoneApi().listByAccount("AAAAAAAAAAAAAAAA");
   }
View Full Code Here

         .endpoint("https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01")
         .addHeader(HOST, "ultra-api.ultradns.com:8443")
         .payload(payloadFromResourceWithContentType("/list_zones_by_account_and_type.xml", "application/xml")).build();

   public void testListByAccountAndTypeWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(listByAccountAndType, listByAccountResponse);

      assertEquals(
            success.getZoneApi().listByAccountAndType("AAAAAAAAAAAAAAAA", Type.PRIMARY).toString(),
            new GetZonesOfAccountResponseTest().expected().toString());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.ultradns.ws.UltraDNSWSApi

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.