/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }
public void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNullEvent() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); try { compositeDbHistoryEventHandler.add(null); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", e.getMessage()); } }
public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNotEmptyListNullTwoEvents() { // prepare the list with two null events List<HistoryEventHandler> historyEventHandlers = new ArrayList<HistoryEventHandler>(); historyEventHandlers.add(null); historyEventHandlers.add(null); try { new CompositeDbHistoryEventHandler(historyEventHandlers); 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 testCompositeDbHistoryEventHandlerNonArgumentConstructorAddTwoNotNullEvents() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler()); compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(4, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNullVarargs() { HistoryEventHandler historyEventHandler = null; try { new CompositeDbHistoryEventHandler(historyEventHandler); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", e.getMessage()); } }
/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml"}) public void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNotNullEvent() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNullTwoVarargs() { try { new CompositeDbHistoryEventHandler(null, null); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", e.getMessage()); } }
/** * Non-argument constructor that adds {@link DbHistoryEventHandler} to the * list of {@link HistoryEventHandler}. */ public CompositeDbHistoryEventHandler() { super(); addDefaultDbHistoryEventHandler(); }
public void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNullEvent() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); try { compositeDbHistoryEventHandler.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 testCompositeDbHistoryEventHandlerArgumentConstructorWithEmptyList() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(new ArrayList<HistoryEventHandler>()); processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(0, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddTwoNotNullEvents() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler()); compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(4, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml"}) public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNotEmptyListNotNullTwoEvents() { // prepare the list with two events List<HistoryEventHandler> historyEventHandlers = new ArrayList<HistoryEventHandler>(); historyEventHandlers.add(new CustomDbHistoryEventHandler()); historyEventHandlers.add(new CustomDbHistoryEventHandler()); CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(historyEventHandlers); processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(4, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml"}) public void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNotNullEvent() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); compositeDbHistoryEventHandler.add(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml"}) public void testCompositeDbHistoryEventHandlerNonArgumentConstructor() { processEngineConfiguration.setHistoryEventHandler(new CompositeDbHistoryEventHandler()); startProcessAndCompleteUserTask(); assertEquals(0, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
/** * Non-argument constructor that adds {@link DbHistoryEventHandler} to the * list of {@link HistoryEventHandler}. */ public CompositeDbHistoryEventHandler() { super(); addDefaultDbHistoryEventHandler(); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeDbHistoryEventHandlerArgumentConstructorWithNotNullVarargsOneEvent() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeDbHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event and adds {@link DbHistoryEventHandler} to the list of * {@link HistoryEventHandler}. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeDbHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { super(historyEventHandlers); addDefaultDbHistoryEventHandler(); }