jclouds-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunny Gleason <notificati...@github.com>
Subject Re: [jclouds] Jclouds 136 -- Implementation of DynECT HTTP Redirect service API (#37)
Date Sat, 29 Jun 2013 16:57:14 GMT
> +   HttpRequest delete = HttpRequest.builder().method(DELETE)
> +                                   .endpoint("https://api2.dynect.net/REST/HTTPRedirect/redirect.adriancole.zone.dynecttest.jclouds.org/redirect.adriancole.zone.dynecttest.jclouds.org/")
> +                                   .addHeader("API-Version", "3.3.8")
> +                                   .addHeader(ACCEPT, APPLICATION_JSON)
> +                                   .addHeader(CONTENT_TYPE, APPLICATION_JSON)
> +                                   .addHeader("Auth-Token", authToken).build();
> +
> +   HttpResponse deleteResponse = HttpResponse.builder().statusCode(OK.getStatusCode())
> +         .payload(payloadFromResourceWithContentType("/delete_redirect.json", APPLICATION_JSON)).build();
> +
> +   public void testDeleteWhenResponseIs2xx() {
> +      DynECTApi success = requestsSendResponses(createSession, createSessionResponse,
delete, deleteResponse);
> +      assertEquals(success.getHttpRedirectApiForZone("redirect.adriancole.zone.dynecttest.jclouds.org").scheduleDelete("redirect.adriancole.zone.dynecttest.jclouds.org").toString(),
> +                   Job.success(387955406l).toString());
> +   }
> +}

Absolutely -- great idea

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/37/files#r4952489

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message