Search in sources :

Example 16 with FilterEntity

use of org.camunda.bpm.engine.impl.persistence.entity.FilterEntity in project camunda-bpm-platform by camunda.

the class FilterRestServiceInteractionTest method testGetFilterWithoutSorting.

@Test
public void testGetFilterWithoutSorting() {
    TaskQuery query = new TaskQueryImpl();
    Filter filter = new FilterEntity("Task").setName("test").setQuery(query);
    when(filterServiceMock.getFilter(EXAMPLE_FILTER_ID)).thenReturn(filter);
    given().pathParam("id", EXAMPLE_FILTER_ID).then().expect().statusCode(Status.OK.getStatusCode()).body("query.sorting", isEmptyOrNullString()).when().get(SINGLE_FILTER_URL);
}
Also used : TaskQueryImpl(org.camunda.bpm.engine.impl.TaskQueryImpl) Filter(org.camunda.bpm.engine.filter.Filter) MockProvider.mockFilter(org.camunda.bpm.engine.rest.helper.MockProvider.mockFilter) FilterEntity(org.camunda.bpm.engine.impl.persistence.entity.FilterEntity) TaskQuery(org.camunda.bpm.engine.task.TaskQuery) Test(org.junit.Test)

Aggregations

FilterEntity (org.camunda.bpm.engine.impl.persistence.entity.FilterEntity)16 Filter (org.camunda.bpm.engine.filter.Filter)14 TaskQueryImpl (org.camunda.bpm.engine.impl.TaskQueryImpl)12 MockProvider.mockFilter (org.camunda.bpm.engine.rest.helper.MockProvider.mockFilter)12 Test (org.junit.Test)12 TaskQuery (org.camunda.bpm.engine.task.TaskQuery)8 Response (com.jayway.restassured.response.Response)6 HashMap (java.util.HashMap)6 Map (java.util.Map)6 Matchers.isEmptyOrNullString (org.hamcrest.Matchers.isEmptyOrNullString)6 Matchers.anyString (org.mockito.Matchers.anyString)6 AuthorizationException (org.camunda.bpm.engine.AuthorizationException)1 AbstractQuery (org.camunda.bpm.engine.impl.AbstractQuery)1 CommandContext (org.camunda.bpm.engine.impl.interceptor.CommandContext)1