use of org.cloudfoundry.uaa.users.Users in project cf-java-client by cloudfoundry.
the class PaginationUtilsTest method requestUaaResources.
@Test
public void requestUaaResources() {
Users users = mock(Users.class, RETURNS_SMART_NULLS);
requestListUsers(users, 1, 100, 250);
requestListUsers(users, 101, 100, 250);
requestListUsers(users, 201, 100, 250);
PaginationUtils.requestUaaResources(startIndex -> users.list(ListUsersRequest.builder().startIndex(startIndex).build())).as(StepVerifier::create).expectNextCount(3).expectComplete().verify(Duration.ofSeconds(1));
}
use of org.cloudfoundry.uaa.users.Users in project cf-java-client by cloudfoundry.
the class PaginationUtilsTest method requestUaaResourcesEmpty.
@Test
public void requestUaaResourcesEmpty() {
Users users = mock(Users.class, RETURNS_SMART_NULLS);
requestListUsersEmpty(users, 1, 100);
PaginationUtils.requestUaaResources(startIndex -> users.list(ListUsersRequest.builder().startIndex(startIndex).build())).as(StepVerifier::create).expectComplete().verify(Duration.ofSeconds(1));
}
Aggregations