public void testListRegionsOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1)).allMatch(new Predicate<Region>() { @Override public boolean apply(Region input) { found.incrementAndGet(); return !Strings.isNullOrEmpty(input.slug()); } }), "All regions must have the 'slug' field populated"); assertTrue(found.get() > 0, "Expected some regions to be returned"); }
public void testListSizesOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1)).allMatch(new Predicate<Size>() { @Override public boolean apply(Size input) { found.incrementAndGet(); return !Strings.isNullOrEmpty(input.slug()); } }), "All sizes must have the 'slug' field populated"); assertTrue(found.get() > 0, "Expected some sizes to be returned"); }
public void testListImagesOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<Image>() { @Override public boolean apply(Image input) { found.incrementAndGet(); return !isNullOrEmpty(input.name()); } }), "All images must have the 'name' field populated"); assertTrue(found.get() > 0, "Expected some images to be returned"); }
@Test(dependsOnMethods = "testCreate") public void testListOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<SshKey>() { @Override public boolean apply(SshKey input) { found.incrementAndGet(); return !isNullOrEmpty(input.id()); } }), "All ssh keys must have the 'id' field populated"); assertTrue(found.get() > 0, "Expected some ssh keys to be returned"); }
@Test(dependsOnMethods = "testCreate") public void testListOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<Device>() { @Override public boolean apply(Device input) { found.incrementAndGet(); return !isNullOrEmpty(input.id()); } }), "All devices must have the 'id' field populated"); assertTrue(found.get() > 0, "Expected some devices to be returned"); }
public void testListOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<Project>() { @Override public boolean apply(Project input) { found.incrementAndGet(); return !isNullOrEmpty(input.id()); } }), "All projects must have the 'id' field populated"); assertTrue(found.get() > 0, "Expected some projects to be returned"); }
public void testListOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<Plan>() { @Override public boolean apply(Plan input) { found.incrementAndGet(); return !isNullOrEmpty(input.id()); } }), "All plans must have the 'id' field populated"); assertTrue(found.get() > 0, "Expected some plans to be returned"); }
public void testListOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<OperatingSystem>() { @Override public boolean apply(OperatingSystem input) { found.incrementAndGet(); return !isNullOrEmpty(input.id()); } }), "All operating systems must have the 'id' field populated"); assertTrue(found.get() > 0, "Expected some operating systems to be returned"); }
public void testListOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<Facility>() { @Override public boolean apply(Facility input) { found.incrementAndGet(); return !isNullOrEmpty(input.id()); } }), "All facilities must have the 'id' field populated"); assertTrue(found.get() > 0, "Expected some facilities to be returned"); }
public void testListImagesByType() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(type("distribution").perPage(5)).allMatch(new Predicate<Image>() { @Override public boolean apply(Image input) { found.incrementAndGet(); return !isNullOrEmpty(input.distribution()); } }), "All images must have the 'distribution' field populated"); assertTrue(found.get() > 0, "Expected some images to be returned"); }
public void testListActionsOnePage() { final AtomicInteger found = new AtomicInteger(0); assertTrue(api().list(page(1).perPage(5)).allMatch(new Predicate<Action>() { @Override public boolean apply(Action input) { found.incrementAndGet(); return !isNullOrEmpty(input.type()); } }), "All actions must have the 'type' field populated"); assertTrue(found.get() > 0, "Expected some actions to be returned"); }