public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNullEvent() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); try { compositeHistoryEventHandler.add(null); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullTwoEvents() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); compositeHistoryEventHandler.add(new CustomDbHistoryEventHandler()); compositeHistoryEventHandler.add(new DbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullEvent() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); compositeHistoryEventHandler.add(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(0, historyService.createHistoricDetailQuery().count()); }
public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNullEvent() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); try { compositeHistoryEventHandler.add(null); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", e.getMessage()); } }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullTwoEvents() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); compositeHistoryEventHandler.add(new CustomDbHistoryEventHandler()); compositeHistoryEventHandler.add(new DbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullEvent() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); compositeHistoryEventHandler.add(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(0, historyService.createHistoricDetailQuery().count()); }