use of org.springframework.hateoas.PagedResources in project taskana by Taskana.
the class TaskControllerIntTest method testGetAllTasksKeepingFilters.
@Test
public void testGetAllTasksKeepingFilters() {
RestTemplate template = getRestTemplate();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x");
HttpEntity<String> request = new HttpEntity<String>(headers);
ResponseEntity<PagedResources<TaskSummaryResource>> response = template.exchange("http://127.0.0.1:" + port + "/v1/tasks?por.type=VNR&por.value=22334455&sortBy=por.value&order=desc", HttpMethod.GET, request, new ParameterizedTypeReference<PagedResources<TaskSummaryResource>>() {
});
assertNotNull(response.getBody().getLink(Link.REL_SELF));
assertTrue(response.getBody().getLink(Link.REL_SELF).getHref().endsWith("/v1/tasks?por.type=VNR&por.value=22334455&sortBy=por.value&order=desc"));
}
Aggregations