gatj98 commented on this pull request.
> +/**
+ * Mock tests for the {@link InfrastructureApi} class.
+ */
+@Test(groups = "unit", testName = "InfrastructureApiMockTest", singleThreaded
= true)
+public class InfrastructureApiMockTest extends
BaseAccountAwareCloudControlMockTest {
+
+ public void testListDatacenters() throws Exception {
+ server.enqueue(jsonResponse("/datacenters.json"));
+ Iterable<Datacenter> datacenters =
api.getInfrastructureApi().listDatacenters().concat();
+
+ assertEquals(size(datacenters), 2); // Force the PagedIterable to advance
+ assertEquals(server.getRequestCount(), 2);
+
+ Uris.UriBuilder uriBuilder = Uris
+
.uriBuilder("/caas/2.4/6ac1e746-b1ea-4da5-a24e-caf1a978789d/infrastructure/datacenter");
+ Set<String> zones =
ctx.utils().injector().getInstance(ZoneIdsSupplier.class).get();
Will look at this in conjunction with the region/zone config discussed above
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/377#discussion_r108117990