示例#1
0
        public virtual void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddTwoNotNullEvents()
        {
            CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler();

            compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler(this));
            compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler(this));
            processEngineConfiguration.HistoryEventHandler = compositeDbHistoryEventHandler;

            startProcessAndCompleteUserTask();

            assertEquals(4, countCustomHistoryEventHandler);
            assertEquals(2, historyService.createHistoricDetailQuery().count());
        }
示例#2
0
        public virtual void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNullEvent()
        {
            CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler();

            try
            {
                compositeDbHistoryEventHandler.add(null);
                fail("NullValueException expected");
            }
            catch (NullValueException e)
            {
                assertTextPresent("History event handler is null", e.Message);
            }
        }