jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] Profitbricks IpBlock API (#141)
Date Mon, 02 Mar 2015 15:02:53 GMT
> +   public void testGetAllIpBlock() throws Exception {
> +      MockWebServer server = mockWebServer();
> +      server.enqueue(new MockResponse().setBody(payloadFromResource("/ipblock/ipblocks.xml")));
> +
> +      ProfitBricksApi pbApi = api(server.getUrl(rootUrl));
> +      IpBlockApi api = pbApi.ipBlockApi();
> +
> +      try {
> +         List<IpBlock> ipBlocks = api.getAllIpBlock();
> +         assertRequestHasCommonProperties(server.takeRequest());
> +         assertNotNull(ipBlocks);
> +      } finally {
> +         pbApi.close();
> +         server.shutdown();
> +      }
> +   }

The get all blocks method also defines a 404 fallback. Add the corresponding test.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/141/files#r25603960
Mime
View raw message