use of org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerNonArgumentConstructorAddNullEvent.
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());
}
}
use of org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullTwoEvents.
@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());
}
use of org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerArgumentConstructorWithNullVarargs.
public void testCompositeHistoryEventHandlerArgumentConstructorWithNullVarargs() {
HistoryEventHandler historyEventHandler = null;
try {
new CompositeHistoryEventHandler(historyEventHandler);
fail("NullValueException expected");
} catch (NullValueException e) {
assertTextPresent("History event handler is null", e.getMessage());
}
}
use of org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerNonArgumentConstructorAddNotNullEvent.
@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());
}
use of org.camunda.bpm.engine.impl.history.handler.CompositeHistoryEventHandler in project camunda-bpm-platform by camunda.
the class CompositeHistoryEventHandlerTest method testCompositeHistoryEventHandlerArgumentConstructorWithNotNullVarargsOneEvent.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoryLevelTest.bpmn20.xml" })
public void testCompositeHistoryEventHandlerArgumentConstructorWithNotNullVarargsOneEvent() {
CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(new CustomDbHistoryEventHandler());
processEngineConfiguration.setHistoryEventHandler(compositeHistoryEventHandler);
startProcessAndCompleteUserTask();
assertEquals(2, countCustomHistoryEventHandler);
assertEquals(0, historyService.createHistoricDetailQuery().count());
}
Aggregations