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] JClouds Profitbricks provider - LoadBalancer API (#143)
Date Mon, 09 Mar 2015 17:16:41 GMT
> +
> +@Test(groups = "unit", testName = "LoadbalancerApiMockTest")
> +public class LoadbalancerApiMockTest extends BaseProfitBricksMockTest {
> +
> +   @Test
> +   public void testGetAllLoadBalancers() throws Exception {
> +      MockWebServer server = mockWebServer();
> +      server.enqueue(new MockResponse().setBody(payloadFromResource("/loadbalancer/loadbalancers.xml")));
> +
> +      ProfitBricksApi pbApi = api(server.getUrl(rootUrl));
> +      LoadBalancerApi api = pbApi.loadBalancerApi();
> +
> +      try {
> +         List<LoadBalancer> loadBalancerList = api.getAllLoadBalancers();
> +
> +         assertRequestHasCommonProperties(server.takeRequest());

Verify the body of the request too.

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