Package org.jclouds.dynect.v3.parse

Examples of org.jclouds.dynect.v3.parse.DeleteZoneChangesResponseTest


        .fqdn("jclouds.org")
        .type("TXT")
        .id(50976579l).build();

   public void testGetTXTWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, getTXT, txtResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").getTXT(txtId.getFQDN(), txtId.getId()).toString(),
                   new GetTXTRecordResponseTest().expected().toString());
   }
View Full Code Here


      assertEquals(success.getRecordApiForZone("jclouds.org").getTXT(txtId.getFQDN(), txtId.getId()).toString(),
                   new GetTXTRecordResponseTest().expected().toString());
   }

   public void testGetTXTWhenResponseIs404() {
      DynECTApi fail = requestsSendResponses(createSession, createSessionResponse, getTXT, notFound);
      assertNull(fail.getRecordApiForZone("jclouds.org").getTXT(txtId.getFQDN(), txtId.getId()));
   }
View Full Code Here

   HttpResponse listResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/list_records.json", APPLICATION_JSON)).build();

   public void testListWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, list, listResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").list().toString(),
                   new ListRecordsResponseTest().expected().toString());
   }
View Full Code Here

         .addHeader("API-Version", "3.3.8")
         .addHeader(CONTENT_TYPE, APPLICATION_JSON)
         .addHeader("Auth-Token", authToken).build();  

   public void testListByFQDNWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, listByFQDN, listResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").listByFQDN("www.foo.com").toString(),
      new ListRecordsResponseTest().expected().toString());
   }
View Full Code Here

      assertEquals(success.getRecordApiForZone("jclouds.org").listByFQDN("www.foo.com").toString(),
      new ListRecordsResponseTest().expected().toString());
   }
  
   public void testListByFQDNWhenResponseIs404() {
      DynECTApi fail = requestsSendResponses(createSession, createSessionResponse, listByFQDN, notFound);
      assertTrue(fail.getRecordApiForZone("jclouds.org").listByFQDN("www.foo.com").isEmpty());
   }
View Full Code Here

                                              .addHeader("API-Version", "3.3.8")
                                              .addHeader(CONTENT_TYPE, APPLICATION_JSON)
                                              .addHeader("Auth-Token", authToken).build();  

   public void testListByFQDNAndTypeWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, listByFQDNAndType, listResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").listByFQDNAndType("www.foo.com", "A").toString(),
            new ListRecordsResponseTest().expected().toString());
   }
View Full Code Here

      assertEquals(success.getRecordApiForZone("jclouds.org").listByFQDNAndType("www.foo.com", "A").toString(),
            new ListRecordsResponseTest().expected().toString());
   }
  
   public void testListByFQDNAndTypeWhenResponseIs404() {
       DynECTApi fail = requestsSendResponses(createSession, createSessionResponse, listByFQDNAndType, notFound);
       assertTrue(fail.getRecordApiForZone("jclouds.org").listByFQDNAndType("www.foo.com", "A").isEmpty());
    }
View Full Code Here

   HttpResponse createResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
         .payload(payloadFromResourceWithContentType("/new_record.json", APPLICATION_JSON)).build();

   public void testCreateWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse);
      CreateRecord<AData> record = CreateRecord.<AData> builder()
                                               .fqdn("www.jclouds.org")
                                               .type("A")
                                               .ttl(86400)
                                               .rdata(a("1.1.1.1"))
                                               .build();
      assertEquals(success.getRecordApiForZone("jclouds.org").scheduleCreate(record), Job.success(285372440l));
   }
View Full Code Here

                     .type("A")
                     .id(285372440l)
                     .build();

   public void testDeleteWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, delete, deleteResponse);

      assertEquals(success.getRecordApiForZone("jclouds.org").scheduleDelete(id), Job.success(285372457l));
   }
View Full Code Here

      assertEquals(success.getRecordApiForZone("jclouds.org").scheduleDelete(id), Job.success(285372457l));
   }

   public void testDeleteWhenResponseIs404() {
      DynECTApi fail = requestsSendResponses(createSession, createSessionResponse, delete, notFound);
      assertNull(fail.getRecordApiForZone("jclouds.org").scheduleDelete(id));
   }
View Full Code Here

TOP

Related Classes of org.jclouds.dynect.v3.parse.DeleteZoneChangesResponseTest

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.