public virtual void testCompositeDbHistoryEventHandlerArgumentConstructorWithEmptyList() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(new List <HistoryEventHandler>()); processEngineConfiguration.HistoryEventHandler = compositeDbHistoryEventHandler; startProcessAndCompleteUserTask(); assertEquals(0, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
public virtual void testCompositeDbHistoryEventHandlerArgumentConstructorWithNotNullVarargsTwoEvents() { CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(new CustomDbHistoryEventHandler(this), new CustomDbHistoryEventHandler(this)); processEngineConfiguration.HistoryEventHandler = compositeDbHistoryEventHandler; startProcessAndCompleteUserTask(); assertEquals(4, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }
public virtual void testCompositeDbHistoryEventHandlerArgumentConstructorWithEmptyList() { var compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(new List <IHistoryEventHandler>()); processEngineConfiguration.HistoryEventHandler = compositeDbHistoryEventHandler; StartProcessAndCompleteUserTask(); Assert.AreEqual(0, CountCustomHistoryEventHandler); Assert.AreEqual(2, historyService.CreateHistoricDetailQuery() .Count()); }
public virtual void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNotNullEvent() { var compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); compositeDbHistoryEventHandler.Add(new CustomDbHistoryEventHandler(this)); //processEngineConfiguration.HistoryEventHandler = compositeDbHistoryEventHandler; StartProcessAndCompleteUserTask(); Assert.AreEqual(2, CountCustomHistoryEventHandler); Assert.AreEqual(2, historyService.CreateHistoricDetailQuery() .Count()); }
public virtual void testCompositeDbHistoryEventHandlerNonArgumentConstructorAddNullEvent() { var compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(); try { compositeDbHistoryEventHandler.Add(null); Assert.Fail("NullValueException expected"); } catch (NullValueException e) { AssertTextPresent("History event handler is null", e.Message); } }
public virtual void testCompositeDbHistoryEventHandlerArgumentConstructorWithNotEmptyListNotNullTwoEvents() { // prepare the list with two events IList <HistoryEventHandler> historyEventHandlers = new List <HistoryEventHandler>(); historyEventHandlers.Add(new CustomDbHistoryEventHandler(this)); historyEventHandlers.Add(new CustomDbHistoryEventHandler(this)); CompositeDbHistoryEventHandler compositeDbHistoryEventHandler = new CompositeDbHistoryEventHandler(historyEventHandlers); processEngineConfiguration.HistoryEventHandler = compositeDbHistoryEventHandler; startProcessAndCompleteUserTask(); assertEquals(4, countCustomHistoryEventHandler); assertEquals(2, historyService.createHistoricDetailQuery().count()); }