Package org.activiti.engine.impl.test
Class TestHelper
java.lang.Object
org.activiti.engine.impl.test.TestHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringannotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, String methodName) static voidannotationDeploymentTearDown(ProcessEngine processEngine, String deploymentId, Class<?> testClass, String methodName) static voidannotationMockSupportSetup(Class<?> testClass, String methodName, ActivitiMockSupport mockSupport) static voidannotationMockSupportTeardown(ActivitiMockSupport mockSupport) static voidassertAndEnsureCleanDb(ProcessEngine processEngine) Each test is assumed to clean up all DB content it entered.static voidassertProcessEnded(ProcessEngine processEngine, String processInstanceId) static voidstatic StringgetBpmnProcessDefinitionResource(Class<?> type, String name) get a resource location by convention based on a class (type) and a relative resource name.static ProcessEnginegetProcessEngine(String configurationResource) protected static voidhandleMockServiceTaskAnnotation(ActivitiMockSupport mockSupport, Method method) protected static voidhandleMockServiceTaskAnnotation(ActivitiMockSupport mockSupport, MockServiceTask mockedServiceTask) protected static voidhandleMockServiceTasksAnnotation(ActivitiMockSupport mockSupport, Method method) protected static voidhandleNoOpServiceTasksAnnotation(ActivitiMockSupport mockSupport, Method method) static TestActivityBehaviorFactoryinitializeTestActivityBehaviorFactory(ActivityBehaviorFactory existingActivityBehaviorFactory)
-
Field Details
-
EMPTY_LINE
- See Also:
-
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK
-
-
Constructor Details
-
TestHelper
public TestHelper()
-
-
Method Details
-
assertProcessEnded
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, String methodName) -
annotationDeploymentTearDown
public static void annotationDeploymentTearDown(ProcessEngine processEngine, String deploymentId, Class<?> testClass, String methodName) -
annotationMockSupportSetup
public static void annotationMockSupportSetup(Class<?> testClass, String methodName, ActivitiMockSupport mockSupport) -
handleMockServiceTaskAnnotation
protected static void handleMockServiceTaskAnnotation(ActivitiMockSupport mockSupport, Method method) -
handleMockServiceTaskAnnotation
protected static void handleMockServiceTaskAnnotation(ActivitiMockSupport mockSupport, MockServiceTask mockedServiceTask) -
handleMockServiceTasksAnnotation
protected static void handleMockServiceTasksAnnotation(ActivitiMockSupport mockSupport, Method method) -
handleNoOpServiceTasksAnnotation
protected static void handleNoOpServiceTasksAnnotation(ActivitiMockSupport mockSupport, Method method) -
annotationMockSupportTeardown
-
getBpmnProcessDefinitionResource
get a resource location by convention based on a class (type) and a relative resource name. The return value will be the full classpath location of the type, plus a suffix built from the name parameter:BpmnDeployer.BPMN_RESOURCE_SUFFIXES. The first resource matching a suffix will be returned. -
getProcessEngine
-
closeProcessEngines
public static void closeProcessEngines() -
assertAndEnsureCleanDb
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. -
initializeTestActivityBehaviorFactory
public static TestActivityBehaviorFactory initializeTestActivityBehaviorFactory(ActivityBehaviorFactory existingActivityBehaviorFactory)
-