public virtual void testQueryByFilterId() { FilterQuery query = filterService.createFilterQuery().filterId(filterIds[0]); assertNotNull(query.singleResult()); assertEquals(1, query.list().size()); assertEquals(1, query.count()); }
public virtual void testQueryByNameLike() { FilterQuery query = filterService.createFilterQuery().filterNameLike("%\\_"); assertNotNull(query.singleResult()); assertEquals(1, query.list().size()); assertEquals(1, query.count()); }
public virtual void testQueryNoCriteria() { FilterQuery query = filterService.createFilterQuery(); assertEquals(4, query.count()); assertEquals(4, query.list().size()); try { query.singleResult(); fail("Exception expected"); } catch (ProcessEngineException) { // expected } }
public virtual void testQueryByResourceType() { FilterQuery query = filterService.createFilterQuery().filterResourceType(EntityTypes.TASK); try { query.singleResult(); fail("Exception expected"); } catch (ProcessEngineException) { // expected } assertEquals(4, query.list().size()); assertEquals(4, query.count()); }
public virtual 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) { // expected } }