use of eu.europa.ec.fisheries.schema.rules.search.v1.TicketListCriteria in project UVMS-Docker by UnionVMS.
the class RulesTicketRestIT method getTicketListTest.
/**
* Gets the ticket list test.
*
* @return the ticket list test
* @throws Exception the exception
*/
@Test
public void getTicketListTest() throws Exception {
TicketQuery ticketQuery = new TicketQuery();
ListPagination listPagination = new ListPagination();
listPagination.setListSize(100);
listPagination.setPage(1);
ticketQuery.setPagination(listPagination);
TicketListCriteria ticketListCriteria = new TicketListCriteria();
ticketListCriteria.setKey(TicketSearchKey.STATUS);
ticketListCriteria.setValue("Open");
ticketQuery.getTicketSearchCriteria().add(ticketListCriteria);
final HttpResponse response = Request.Post(getBaseUrl() + "rules/rest/tickets/list/" + URLEncoder.encode("vms_admin_com")).setHeader("Content-Type", "application/json").setHeader("Authorization", getValidJwtToken()).bodyByteArray(writeValueAsString(ticketQuery).getBytes()).execute().returnResponse();
Map<String, Object> dataMap = checkSuccessResponseReturnMap(response);
}
Aggregations