Package org.jclouds.ultradns.ws

Examples of org.jclouds.ultradns.ws.UltraDNSWSApi


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

   public void testRunTestWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(runTest, runTestResponse);

      assertEquals(success.getTaskApi().runTest("foo").toString(), "8d7a1725-4f4a-4b70-affa-f01dcce1526e");
   }
View Full Code Here


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

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

      assertEquals(
            success.getTaskApi().get("0b40c7dd-748d-4c49-8506-26f0c7d2ea9c").toString(),
            new GetStatusForTaskResponseResponseTest().expected().toString());
   }
View Full Code Here

  
   HttpResponse taskDoesntExist = HttpResponse.builder().message("Server Error").statusCode(INTERNAL_SERVER_ERROR.getStatusCode())
         .payload(payloadFromResource("/task_doesnt_exist.xml")).build();
  
   public void testGetWhenResponseError2401() {
      UltraDNSWSApi notFound = requestSendsResponse(get, taskDoesntExist);
      assertNull(notFound.getTaskApi().get("0b40c7dd-748d-4c49-8506-26f0c7d2ea9c"));
   }
View Full Code Here

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

   public void testClearWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(clear, clearResponse);
      success.getTaskApi().clear("0b40c7dd-748d-4c49-8506-26f0c7d2ea9c");
   }
View Full Code Here

      UltraDNSWSApi success = requestSendsResponse(clear, clearResponse);
      success.getTaskApi().clear("0b40c7dd-748d-4c49-8506-26f0c7d2ea9c");
   }

   public void testClearWhenResponseError2401() {
      UltraDNSWSApi notFound = requestSendsResponse(clear, taskDoesntExist);
      notFound.getTaskApi().clear("0b40c7dd-748d-4c49-8506-26f0c7d2ea9c");
   }
View Full Code Here

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

   public void testListWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(list, listResponse);

      assertEquals(
            success.getTaskApi().list().toString(),
            new GetAllTasksResponseTest().expected().toString());
   }
View Full Code Here

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

   public void testCreateWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(create, createResponse);
      assertEquals(
            success.getDirectionalPoolApiForZone("jclouds.org.").createForDNameAndType("foo",
                  "www.jclouds.org.", IPV4.getCode()), "06063DC355055E68");
   }
View Full Code Here

         .payload(payloadFromResourceWithContentType("/directionalpool_already_exists.xml", "application/xml"))
         .build();

   @Test(expectedExceptions = ResourceAlreadyExistsException.class, expectedExceptionsMessageRegExp = "Pool already created for this host name : www.jclouds.org.")
   public void testCreateWhenResponseError2912() {
      UltraDNSWSApi already = requestSendsResponse(create, alreadyCreated);
      already.getDirectionalPoolApiForZone("jclouds.org.").createForDNameAndType("foo", "www.jclouds.org.",
            IPV4.getCode());
   }
View Full Code Here

                                                        .type("A")
                                                        .ttl(300)
                                                        .rdata("1.1.0.1").build();

   public void testAddFirstRecordInNonConfiguredGroupWhenResponseIs2xx() {
      UltraDNSWSApi success = requestSendsResponse(addFirstRecordInNonConfiguredGroup, recordCreatedResponse);
      assertEquals(
            success.getDirectionalPoolApiForZone("jclouds.org.").addFirstRecordInNonConfiguredGroup("06063DC355055E68",
                  record), "06063DC355058294");
   }
View Full Code Here

         .payload(payloadFromResourceWithContentType("/directionalrecord_already_exists.xml", "application/xml"))
         .build();

   @Test(expectedExceptions = ResourceAlreadyExistsException.class, expectedExceptionsMessageRegExp = "Resource Record already exists.")
   public void testAddFirstRecordInNonConfiguredGroupWhenResponseError1802() {
      UltraDNSWSApi already = requestSendsResponse(addFirstRecordInNonConfiguredGroup, recordAlreadyCreated);
      already.getDirectionalPoolApiForZone("jclouds.org.").addFirstRecordInNonConfiguredGroup("06063DC355055E68",
            record);
   }
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.