Search in sources :

Example 1 with PollableQuery

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

the class PollRestIT method getPollableChannelsTest.

/**
 * Gets the pollable channels test.
 *
 * @return the pollable channels test
 * @throws Exception
 *             the exception
 */
@Test
public void getPollableChannelsTest() throws Exception {
    PollableQuery pollableQuery = new PollableQuery();
    ListPagination listPagination = new ListPagination();
    listPagination.setListSize(100);
    listPagination.setPage(1);
    pollableQuery.setPagination(listPagination);
    pollableQuery.getConnectIdList().add("connectId");
    final HttpResponse response = Request.Post(getBaseUrl() + "mobileterminal/rest/poll/pollable").setHeader("Content-Type", "application/json").setHeader("Authorization", getValidJwtToken()).bodyByteArray(writeValueAsString(pollableQuery).getBytes()).execute().returnResponse();
    Map<String, Object> dataMap = checkSuccessResponseReturnMap(response);
}
Also used : ListPagination(eu.europa.ec.fisheries.schema.mobileterminal.types.v1.ListPagination) PollableQuery(eu.europa.ec.fisheries.schema.mobileterminal.polltypes.v1.PollableQuery) HttpResponse(org.apache.http.HttpResponse) Test(org.junit.Test)

Aggregations

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