Search in sources :

Example 1 with PollSearchCriteria

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

the class PollRestIT method getPollBySearchCriteriaTest.

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

Aggregations

PollListQuery (eu.europa.ec.fisheries.schema.mobileterminal.polltypes.v1.PollListQuery)1 PollSearchCriteria (eu.europa.ec.fisheries.schema.mobileterminal.polltypes.v1.PollSearchCriteria)1 ListPagination (eu.europa.ec.fisheries.schema.mobileterminal.types.v1.ListPagination)1 HttpResponse (org.apache.http.HttpResponse)1 Test (org.junit.Test)1