예제 #1
0
        public virtual void testQueryByFilterId()
        {
            FilterQuery query = filterService.createFilterQuery().filterId(filterIds[0]);

            assertNotNull(query.singleResult());
            assertEquals(1, query.list().size());
            assertEquals(1, query.count());
        }
예제 #2
0
        public virtual void testQueryByNameLike()
        {
            FilterQuery query = filterService.createFilterQuery().filterNameLike("%\\_");

            assertNotNull(query.singleResult());
            assertEquals(1, query.list().size());
            assertEquals(1, query.count());
        }
예제 #3
0
        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
            }
        }
예제 #4
0
        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());
        }
예제 #5
0
        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
            }
        }