use of org.cloudfoundry.client.v2.spaces.Spaces in project cf-java-client by cloudfoundry.
the class PaginationUtilsTest method requestClientV2Resources.
@Test
public void requestClientV2Resources() {
Spaces spaces = mock(Spaces.class, RETURNS_SMART_NULLS);
requestListSpaces(spaces, 1, 3);
requestListSpaces(spaces, 2, 3);
requestListSpaces(spaces, 3, 3);
PaginationUtils.requestClientV2Resources(page -> spaces.list(ListSpacesRequest.builder().page(page).build())).as(StepVerifier::create).expectNextCount(3).expectComplete().verify(Duration.ofSeconds(1));
}
use of org.cloudfoundry.client.v2.spaces.Spaces in project cf-java-client by cloudfoundry.
the class PaginationUtilsTest method requestClientV2ResourcesEmpty.
@Test
public void requestClientV2ResourcesEmpty() {
Spaces spaces = mock(Spaces.class, RETURNS_SMART_NULLS);
requestListSpacesEmpty(spaces);
PaginationUtils.requestClientV2Resources(page -> spaces.list(ListSpacesRequest.builder().page(page).build())).as(StepVerifier::create).expectComplete().verify(Duration.ofSeconds(1));
}
Aggregations