use of org.camunda.bpm.engine.filter.FilterQuery in project camunda-bpm-platform by camunda.
the class FilterQueryTest method testQueryByInvalidFilterId.
public void testQueryByInvalidFilterId() {
FilterQuery query = filterService.createFilterQuery().filterId("invalid");
assertNull(query.singleResult());
assertEquals(0, query.list().size());
assertEquals(0, query.count());
try {
filterService.createFilterQuery().filterId(null);
fail("Exception expected");
} catch (ProcessEngineException e) {
// expected
}
}
use of org.camunda.bpm.engine.filter.FilterQuery in project camunda-bpm-platform by camunda.
the class FilterQueryTest method testQueryByInvalidOwner.
public void testQueryByInvalidOwner() {
FilterQuery query = filterService.createFilterQuery().filterOwner("invalid");
assertNull(query.singleResult());
assertEquals(0, query.list().size());
assertEquals(0, query.count());
try {
filterService.createFilterQuery().filterOwner(null);
fail("Exception expected");
} catch (ProcessEngineException e) {
// expected
}
}
use of org.camunda.bpm.engine.filter.FilterQuery in project camunda-bpm-platform by camunda.
the class FilterQueryTest method testQueryNoCriteria.
public void testQueryNoCriteria() {
FilterQuery query = filterService.createFilterQuery();
assertEquals(4, query.count());
assertEquals(4, query.list().size());
try {
query.singleResult();
fail("Exception expected");
} catch (ProcessEngineException e) {
// expected
}
}
use of org.camunda.bpm.engine.filter.FilterQuery in project camunda-bpm-platform by camunda.
the class FilterQueryTest method testQueryByInvalidResourceType.
public void testQueryByInvalidResourceType() {
FilterQuery query = filterService.createFilterQuery().filterResourceType("invalid");
assertNull(query.singleResult());
assertEquals(0, query.list().size());
assertEquals(0, query.count());
try {
filterService.createFilterQuery().filterResourceType(null);
fail("Exception expected");
} catch (ProcessEngineException e) {
// expected
}
}
use of org.camunda.bpm.engine.filter.FilterQuery in project camunda-bpm-platform by camunda.
the class FilterQueryTest method testQueryByResourceType.
public void testQueryByResourceType() {
FilterQuery query = filterService.createFilterQuery().filterResourceType(EntityTypes.TASK);
try {
query.singleResult();
fail("Exception expected");
} catch (ProcessEngineException e) {
// expected
}
assertEquals(4, query.list().size());
assertEquals(4, query.count());
}
Aggregations