Package org.jclouds.ultradns.ws

Examples of org.jclouds.ultradns.ws.UltraDNSWSApi


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

   public void testUpdateRecordWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(updateRecord, updateRecordResponse);
      success.getTrafficControllerPoolApiForZone("jclouds.org.").updateRecord("04053D8E57C7931F", update);
   }
View Full Code Here


      success.getTrafficControllerPoolApiForZone("jclouds.org.").updateRecord("04053D8E57C7931F", update);
   }

   @Test(expectedExceptions = ResourceNotFoundException.class, expectedExceptionsMessageRegExp = "Pool Record does not exist.")
   public void testUpdateRecordWhenResponseNotFound() {
      UltraDNSWSApi notFound = requestSendsResponse(updateRecord, recordDoesntExist);
      notFound.getTrafficControllerPoolApiForZone("jclouds.org.").updateRecord("04053D8E57C7931F", update);
   }
View Full Code Here

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

   public void testDeleteRecordWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(deleteRecord, deleteRecordResponse);
      success.getTrafficControllerPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
   }
View Full Code Here

      UltraDNSWSApi success = requestSendsResponse(deleteRecord, deleteRecordResponse);
      success.getTrafficControllerPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
   }

   public void testDeleteRecordWhenResponseNotFound() {
      UltraDNSWSApi notFound = requestSendsResponse(deleteRecord, recordDoesntExist);
      notFound.getTrafficControllerPoolApiForZone("jclouds.org.").deleteRecord("04053D8E57C7931F");
   }
View Full Code Here

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

   public void testCreateWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(create, createResponse);
      success.getZoneApi().createInAccount("jclouds.org.", "AAAAAAAAAAAAAAAA");
   }
View Full Code Here

   HttpResponse alreadyCreated = HttpResponse.builder().statusCode(INTERNAL_SERVER_ERROR.getStatusCode())
         .payload(payloadFromResourceWithContentType("/zone_already_exists.xml", "application/xml")).build();

   @Test(expectedExceptions = ResourceAlreadyExistsException.class, expectedExceptionsMessageRegExp = "Zone already exists in the system.")
   public void testCreateWhenResponseError1802() {
      UltraDNSWSApi already = requestSendsResponse(create, alreadyCreated);
      already.getZoneApi().createInAccount("jclouds.org.", "AAAAAAAAAAAAAAAA");
   }
View Full Code Here

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

   public void testGetWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(get, getResponse);

      assertEquals(
            success.getZoneApi().get("jclouds.org.").toString(),
            new GetGeneralPropertiesForZoneResponseTest().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();
  
   public void testGetWhenResponseError2401() {
      UltraDNSWSApi notFound = requestSendsResponse(get, zoneDoesntExist);
      assertNull(notFound.getZoneApi().get("jclouds.org."));
   }
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

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.