Class AbstractActivitiTestCase

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.activiti.engine.impl.test.AbstractTestCase
org.activiti.engine.impl.test.AbstractActivitiTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
PluggableActivitiTestCase, ResourceActivitiTestCase

public abstract class AbstractActivitiTestCase extends AbstractTestCase
  • Field Details

  • Constructor Details

    • AbstractActivitiTestCase

      public AbstractActivitiTestCase()
  • Method Details

    • setUp

      protected void setUp() throws Exception
      Overrides:
      setUp in class junit.framework.TestCase
      Throws:
      Exception
    • initializeProcessEngine

      protected abstract void initializeProcessEngine()
    • closeDownProcessEngine

      protected void closeDownProcessEngine()
    • runBare

      public void runBare() throws Throwable
      Overrides:
      runBare in class junit.framework.TestCase
      Throws:
      Throwable
    • validateHistoryData

      protected void validateHistoryData()
    • assertAndEnsureCleanDb

      protected void assertAndEnsureCleanDb() throws Throwable
      Each test is assumed to clean up all DB content it entered. After a test method executed, this method scans all tables to see if the DB is completely clean. It throws AssertionFailed in case the DB is not clean. If the DB is not clean, it is cleaned by performing a create a drop.
      Throws:
      Throwable
    • initializeServices

      protected void initializeServices()
    • assertProcessNotEnded

      public void assertProcessNotEnded(String processInstanceId)
    • assertProcessEnded

      public void assertProcessEnded(String processInstanceId)
    • waitForJobExecutorToProcessAllJobs

      public void waitForJobExecutorToProcessAllJobs(long maxMillisToWait, long intervalMillis)
    • waitForJobExecutorOnCondition

      public void waitForJobExecutorOnCondition(long maxMillisToWait, long intervalMillis, Callable<Boolean> condition)
    • executeJobExecutorForTime

      public void executeJobExecutorForTime(long maxMillisToWait, long intervalMillis)
    • waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs

      public void waitForJobExecutorToProcessAllJobsAndExecutableTimerJobs(long maxMillisToWait, long intervalMillis)
    • createOneTaskTestProcess

      public BpmnModel createOneTaskTestProcess()
      Since the 'one task process' is used everywhere the actual process content doesn't matter, instead of copying around the BPMN 2.0 xml one could use this methodwhich gives a BpmnModel version of the same process back.
    • createTwoTasksTestProcess

      public BpmnModel createTwoTasksTestProcess()
    • createOneTaskAndStartEventWithFormKeyProcess

      public BpmnModel createOneTaskAndStartEventWithFormKeyProcess()
    • deployOneTaskTestProcess

      public String deployOneTaskTestProcess()
      Creates and deploys the one task process. See createOneTaskTestProcess().
      Returns:
      The process definition id (NOT the process definition key) of deployed one task process.
    • deployTwoTasksTestProcess

      public String deployTwoTasksTestProcess()
    • assertHistoricTasksDeleteReason

      protected void assertHistoricTasksDeleteReason(ProcessInstance processInstance, String expectedDeleteReason, String... taskNames)
    • assertHistoricActivitiesDeleteReason

      protected void assertHistoricActivitiesDeleteReason(ProcessInstance processInstance, String expectedDeleteReason, String... activityIds)