@Override public void handleEvents(final List<HistoryEvent> historyEvents) { for (HistoryEvent historyEvent : historyEvents) { handleEvent(historyEvent); } }
/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { initializeHistoryEventHandlers(historyEventHandlers); }
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()); } }
public void testCompositeHistoryEventHandlerArgumentConstructorWithNotEmptyListNullTwoEvents() { // prepare the list with two null events List<HistoryEventHandler> historyEventHandlers = new ArrayList<HistoryEventHandler>(); historyEventHandlers.add(null); historyEventHandlers.add(null); try { new CompositeHistoryEventHandler(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 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()); }
public void testCompositeHistoryEventHandlerArgumentConstructorWithNullTwoVarargs() { try { new CompositeHistoryEventHandler(null, 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 testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullEvent() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); compositeHistoryEventHandler.add(new CustomDbHistoryEventHandler()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(2, countCustomHistoryEventHandler); assertEquals(0, historyService.createHistoricDetailQuery().count()); }
/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { initializeHistoryEventHandlers(historyEventHandlers); }
public void testCompositeHistoryEventHandlerArgumentConstructorWithNullVarargs() { HistoryEventHandler historyEventHandler = null; try { new CompositeHistoryEventHandler(historyEventHandler); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", e.getMessage()); } }
@Override public void handleEvents(final List<HistoryEvent> historyEvents) { for (HistoryEvent historyEvent : historyEvents) { handleEvent(historyEvent); } }
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()); } }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { initializeHistoryEventHandlers(Arrays.asList(historyEventHandlers)); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerArgumentConstructorWithEmptyList() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(new ArrayList<HistoryEventHandler>()); processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler); startProcessAndCompleteUserTask(); assertEquals(0, countCustomHistoryEventHandler); assertEquals(0, historyService.createHistoricDetailQuery().count()); }
@Override public void handleEvents(final List<HistoryEvent> historyEvents) { for (HistoryEvent historyEvent : historyEvents) { handleEvent(historyEvent); } }
@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()); }
/** * Constructor that takes a varargs parameter {@link HistoryEventHandler} that * consume the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final HistoryEventHandler... historyEventHandlers) { initializeHistoryEventHandlers(Arrays.asList(historyEventHandlers)); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerArgumentConstructorWithNotEmptyListNotNullTwoEvents() { // prepare the list with two events List<HistoryEventHandler> historyEventHandlers = new ArrayList<HistoryEventHandler>(); historyEventHandlers.add(new CustomDbHistoryEventHandler()); historyEventHandlers.add(new DbHistoryEventHandler()); CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(historyEventHandlers); 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()); }
/** * Constructor that takes a list of {@link HistoryEventHandler} that consume * the event. * * @param historyEventHandlers * the list of {@link HistoryEventHandler} that consume the event. */ public CompositeHistoryEventHandler(final List<HistoryEventHandler> historyEventHandlers) { initializeHistoryEventHandlers(historyEventHandlers); }
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" }) public void testCompositeHistoryEventHandlerNonArgumentConstructor() { processEngineConfiguration.setHistoryEventHandler(new CompositeHistoryEventHandler()); startProcessAndCompleteUserTask(); assertEquals(0, countCustomHistoryEventHandler); assertEquals(0, historyService.createHistoricDetailQuery().count()); }