use of org.cloudfoundry.client.v2.OrderDirection in project cf-java-client by cloudfoundry.
the class DefaultApplicationsTest method requestEvents.
private static void requestEvents(CloudFoundryClient cloudFoundryClient, String applicationId, EventEntity... entities) {
ListEventsResponse.Builder responseBuilder = fill(ListEventsResponse.builder());
for (EventEntity entity : entities) {
responseBuilder.resource(EventResource.builder().metadata(fill(Metadata.builder()).id("test-event-id").build()).entity(entity).build());
}
when(cloudFoundryClient.events().list(ListEventsRequest.builder().actee(applicationId).orderDirection(OrderDirection.DESCENDING).resultsPerPage(50).page(1).build())).thenReturn(Mono.just(responseBuilder.totalPages(1).build()));
}
Aggregations