public void testListSnapshotsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Snapshot> snapshots = api.dropletApi().listSnapshots(5425561).concat(); assertTrue(isEmpty(snapshots)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/5425561/snapshots"); }
public void testListActionsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Action> actions = api.dropletApi().listActions(1).concat(); assertTrue(isEmpty(actions)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/1/actions"); }
public void testListBackupsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Backup> backups = api.dropletApi().listBackups(5425561).concat(); assertTrue(isEmpty(backups)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/5425561/backups"); }
public void testListDropletsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Droplet> droplets = api.dropletApi().list().concat(); assertTrue(isEmpty(droplets)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets"); }
public void testGetDropletReturns404() throws InterruptedException { server.enqueue(response404()); Droplet droplet = api.dropletApi().get(1); assertNull(droplet); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/1"); }
public void testListKernelsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Kernel> kernels = api.dropletApi().listKernels(5425561).concat(); assertTrue(isEmpty(kernels)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/5425561/kernels"); }
public void testListActionsWithOptionsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Action> actions = api.dropletApi().listActions(1, page(1).perPage(5)); assertTrue(isEmpty(actions)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/1/actions?page=1&per_page=5"); }
public void testListSnapshotsWithOptionsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Snapshot> snapshots = api.dropletApi().listSnapshots(5425561, page(1).perPage(20)); assertTrue(isEmpty(snapshots)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/5425561/snapshots?page=1&per_page=20"); }
public void testListDropletsWithOptionsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Droplet> droplets = api.dropletApi().list(page(1).perPage(20)); assertTrue(isEmpty(droplets)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets?page=1&per_page=20"); }
public void testListBackupsWithOptionsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Backup> backups = api.dropletApi().listBackups(5425561, page(1).perPage(20)); assertTrue(isEmpty(backups)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/5425561/backups?page=1&per_page=20"); }
public void testListKernelsWithOptionsReturns404() throws InterruptedException { server.enqueue(response404()); Iterable<Kernel> kernels = api.dropletApi().listKernels(5425561, page(1).perPage(20)); assertTrue(isEmpty(kernels)); assertEquals(server.getRequestCount(), 1); assertSent(server, "GET", "/droplets/5425561/kernels?page=1&per_page=20"); }
public void testDeleteDropletReturns404() throws InterruptedException { server.enqueue(response404()); api.dropletApi().delete(1); assertEquals(server.getRequestCount(), 1); assertSent(server, "DELETE", "/droplets/1"); }