Search in sources :

Example 1 with MobileTerminalListQuery

use of eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalListQuery in project UVMS-Docker by UnionVMS.

the class MobileTerminalRestIT method getMobileTerminalListTest.

/**
 * Gets the mobile terminal list test.
 *
 * @return the mobile terminal list test
 * @throws Exception
 *             the exception
 */
@Test
public void getMobileTerminalListTest() throws Exception {
    MobileTerminalListQuery queryRequest = new MobileTerminalListQuery();
    ListPagination pagination = new ListPagination();
    pagination.setListSize(100);
    pagination.setPage(1);
    queryRequest.setPagination(pagination);
    MobileTerminalSearchCriteria criteria = new MobileTerminalSearchCriteria();
    criteria.setIsDynamic(true);
    queryRequest.setMobileTerminalSearchCriteria(criteria);
    final HttpResponse response = Request.Post(getBaseUrl() + "mobileterminal/rest/mobileterminal/list").setHeader("Content-Type", "application/json").setHeader("Authorization", getValidJwtToken()).bodyByteArray(writeValueAsString(queryRequest).getBytes()).execute().returnResponse();
    Map<String, Object> dataMap = checkSuccessResponseReturnMap(response);
}
Also used : ListPagination(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.ListPagination) HttpResponse(org.apache.http.HttpResponse) MobileTerminalListQuery(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalListQuery) MobileTerminalSearchCriteria(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalSearchCriteria) Test(org.junit.Test)

Aggregations

ListPagination (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.ListPagination)1 MobileTerminalListQuery (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalListQuery)1 MobileTerminalSearchCriteria (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.MobileTerminalSearchCriteria)1 HttpResponse (org.apache.http.HttpResponse)1 Test (org.junit.Test)1