Package org.jclouds.dynect.v3

Examples of org.jclouds.dynect.v3.DynECTProviderMetadata$Builder


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

   public void testGetWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, get, getResponse);
      assertEquals(success.getZoneApi().get("jclouds.org").toString(),
                   new GetZoneResponseTest().expected().toString());
   }
View Full Code Here


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

   public void testCreateWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse);
      assertEquals(success.getZoneApi().scheduleCreate(CreatePrimaryZone.builder()
                                                                        .fqdn("jclouds.org")
                                                                        .contact("jimmy@jclouds.org")
                                                                        .build()), Job.success(285351593l));
   }
View Full Code Here

                                                                        .contact("jimmy@jclouds.org")
                                                                        .build()), Job.success(285351593l));
   }

   public void testCreateWithContactWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse);
      assertEquals(success.getZoneApi().scheduleCreateWithContact("jclouds.org", "jimmy@jclouds.org"), Job.success(285351593l));
   }
View Full Code Here

      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, create, createResponse);
      assertEquals(success.getZoneApi().scheduleCreateWithContact("jclouds.org", "jimmy@jclouds.org"), Job.success(285351593l));
   }

   public void testGetWhenResponseIs404() {
      DynECTApi fail = requestsSendResponses(createSession, createSessionResponse, get, notFound);
      assertNull(fail.getZoneApi().get("jclouds.org"));
   }
View Full Code Here

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

   public void testListWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, list, listResponse);
      assertEquals(success.getZoneApi().list().toString(),
                   new ListZonesResponseTest().expected().toString());
   }
View Full Code Here

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

   public void testDeleteChangesWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, deleteChanges, deleteChangesResponse);
      assertEquals(success.getZoneApi().deleteChanges("jclouds.org").toString(),
                   new DeleteZoneChangesResponseTest().expected().toString());
   }
View Full Code Here

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

   public void testDeleteWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, delete, deleteResponse);
      assertEquals(success.getZoneApi().delete("jclouds.org").toString(),
                   new DeleteZoneResponseTest().expected().toString());
   }
View Full Code Here

      assertEquals(success.getZoneApi().delete("jclouds.org").toString(),
                   new DeleteZoneResponseTest().expected().toString());
   }

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

         .addHeader("Auth-Token", authToken)
         .payload(stringPayload("{\"publish\":true}"))
         .build();  

   public void testPublishWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, publish, getResponse);
      assertEquals(success.getZoneApi().publish("jclouds.org").toString(),
                   new GetZoneResponseTest().expected().toString());
   }
View Full Code Here

         .addHeader("Auth-Token", authToken)
         .payload(stringPayload("{\"freeze\":true}"))
         .build();  

   public void testFreezeWhenResponseIs2xx() {
      DynECTApi success = requestsSendResponses(createSession, createSessionResponse, freeze, deleteResponse);
      assertEquals(success.getZoneApi().freeze("jclouds.org").toString(),
                   new DeleteZoneResponseTest().expected().toString());
   }
View Full Code Here

TOP

Related Classes of org.jclouds.dynect.v3.DynECTProviderMetadata$Builder

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.