Package com.dyn.client.v3.traffic.domain.RecordSet

Examples of com.dyn.client.v3.traffic.domain.RecordSet.Value


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

   public void testDeleteChangesWhenResponseIs2xx() {
      DynTrafficApi 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() {
      DynTrafficApi 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() {
      DynTrafficApi 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() {
      DynTrafficApi 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() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, freeze, deleteResponse);
      assertEquals(success.getZoneApi().freeze("jclouds.org").toString(),
                   new DeleteZoneResponseTest().expected().toString());
   }
View Full Code Here

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

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

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

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

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

   public void testGetWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, get, getResponse);
      assertEquals(success.getGeoServiceApi().get("srv").toString(), new GetGeoServiceResponseTest().expected()
            .toString());
   }
View Full Code Here

*/
@Test(groups = "unit", testName = "SessionApiExpectTest")
public class SessionApiExpectTest extends BaseDynTrafficApiExpectTest {

   public void testCreateWhenResponseIs2xx() {
      DynTrafficApi apiCreatesSession = requestSendsResponse(createSession, createSessionResponse);
      assertEquals(apiCreatesSession.getSessionApi().login(SessionCredentials.builder()
                                                                         .customerName("jclouds")
                                                                         .userName("joe")
                                                                         .password("letmein").build()).toString(),
                   new CreateSessionResponseTest().expected().toString());
   }
View Full Code Here

   HttpResponse invalidResponse = HttpResponse.builder().statusCode(400)
         .payload(payloadFromResourceWithContentType("/session_invalid.json", APPLICATION_JSON)).build();

   public void testSessionValid() {
      DynTrafficApi apiWhenValid = requestSendsResponse(isValid, validResponse);
      assertTrue(apiWhenValid.getSessionApi().isValid(authToken));
   }
View Full Code Here

TOP

Related Classes of com.dyn.client.v3.traffic.domain.RecordSet.Value

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.