Package com.dyn.client.v3.messaging.handlers

Examples of com.dyn.client.v3.messaging.handlers.DynMessagingErrorHandler


      DynTrafficApi apiWhenValid = requestSendsResponse(isValid, validResponse);
      assertTrue(apiWhenValid.getSessionApi().isValid(authToken));
   }

   public void testSessionInvalid() {
      DynTrafficApi apiWhenInvalid = requestSendsResponse(isValid, invalidResponse);
      assertFalse(apiWhenInvalid.getSessionApi().isValid(authToken));
   }
View Full Code Here


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

   public void testLogout() {
      DynTrafficApi apiWhenLogoutSuccess = requestSendsResponse(logout, logoutResponse);
      apiWhenLogoutSuccess.getSessionApi().logout(authToken);
   }
View Full Code Here

      MockWebServer server = new MockWebServer();
      server.enqueue(new MockResponse().setResponseCode(OK.getStatusCode()).setBody(session));
      server.enqueue(new MockResponse().setResponseCode(OK.getStatusCode()).setBody(running));
      server.play();

      DynTrafficApi api = mockDynectApi(server.getUrl("/").toString());

      try {
         api.getZoneApi().list();
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

      MockWebServer server = new MockWebServer();
      server.enqueue(new MockResponse().setResponseCode(OK.getStatusCode()).setBody(session));
      server.enqueue(new MockResponse().setResponseCode(OK.getStatusCode()).setBody(taskBlocking));
      server.play();

      DynTrafficApi api = mockDynectApi(server.getUrl("/").toString());

      try {
         api.getZoneApi().list();
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

      MockWebServer server = new MockWebServer();
      server.enqueue(new MockResponse().setResponseCode(OK.getStatusCode()).setBody(session));
      server.enqueue(new MockResponse().setResponseCode(OK.getStatusCode()).setBody(targetExists));
      server.play();

      DynTrafficApi api = mockDynectApi(server.getUrl("/").toString());

      try {
         api.getZoneApi().list();
      } finally {
         server.shutdown();
      }
   }
View Full Code Here

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

   public void testGetWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, getSOA, soaResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").get(soaId).toString(),
                   new GetRecordResponseTest().expected().toString());
   }
View Full Code Here

      assertEquals(success.getRecordApiForZone("jclouds.org").get(soaId).toString(),
                   new GetRecordResponseTest().expected().toString());
   }

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

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

   public void testGetAAAAWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, getAAAA, aaaaResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").getAAAA(aaaaId.getFQDN(), aaaaId.getId()).toString(),
                   new GetAAAARecordResponseTest().expected().toString());
   }
View Full Code Here

      assertEquals(success.getRecordApiForZone("jclouds.org").getAAAA(aaaaId.getFQDN(), aaaaId.getId()).toString(),
                   new GetAAAARecordResponseTest().expected().toString());
   }

   public void testGetAAAAWhenResponseIs404() {
      DynTrafficApi fail = requestsSendResponses(createSession, createSessionResponse, getAAAA, notFound);
      assertNull(fail.getRecordApiForZone("jclouds.org").getAAAA(aaaaId.getFQDN(), aaaaId.getId()));
   }
View Full Code Here

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

   public void testGetAWhenResponseIs2xx() {
      DynTrafficApi success = requestsSendResponses(createSession, createSessionResponse, getA, aResponse);
      assertEquals(success.getRecordApiForZone("jclouds.org").getA(aId.getFQDN(), aId.getId()).toString(),
                   new GetARecordResponseTest().expected().toString());
   }
View Full Code Here

TOP

Related Classes of com.dyn.client.v3.messaging.handlers.DynMessagingErrorHandler

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.