Package org.flowable.engine.impl.test
Class TestHelper
- java.lang.Object
-
- org.flowable.engine.impl.test.TestHelper
-
public abstract class TestHelper extends Object
- Author:
- Tom Baeyens, Joram Barrez
-
-
Field Summary
Fields Modifier and Type Field Description static StringEMPTY_LINEstatic List<String>TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK
-
Constructor Summary
Constructors Constructor Description TestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringannotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, Method method)static StringannotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, Method method, Deployment deploymentAnnotation)static StringannotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, String methodName)static StringannotationDeploymentSetUp(ProcessEngine processEngine, Method method, Deployment deploymentAnnotation)static voidannotationDeploymentTearDown(ProcessEngine processEngine, String deploymentId, Class<?> testClass, String methodName)static voidannotationMockSupportSetup(Class<?> testClass, String methodName, FlowableMockSupport mockSupport)static voidannotationMockSupportTeardown(FlowableMockSupport mockSupport)static voidassertAndEnsureCleanDb(ProcessEngine processEngine)Each test is assumed to clean up all DB content it entered.static voidassertProcessEnded(ProcessEngine processEngine, String processInstanceId)static voidcloseProcessEngines()static 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(FlowableMockSupport mockSupport, Method method)static voidhandleMockServiceTaskAnnotation(FlowableMockSupport mockSupport, MockServiceTask mockedServiceTask)protected static voidhandleMockServiceTasksAnnotation(FlowableMockSupport mockSupport, Method method)protected static voidhandleNoOpServiceTasksAnnotation(FlowableMockSupport mockSupport, Method method)static voidhandleNoOpServiceTasksAnnotation(FlowableMockSupport mockSupport, NoOpServiceTasks noOpServiceTasks)static TestActivityBehaviorFactoryinitializeTestActivityBehaviorFactory(ActivityBehaviorFactory existingActivityBehaviorFactory)
-
-
-
Field Detail
-
EMPTY_LINE
public static final String EMPTY_LINE
- See Also:
- Constant Field Values
-
-
Method Detail
-
assertProcessEnded
public static void assertProcessEnded(ProcessEngine processEngine, String processInstanceId)
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, String methodName)
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, Method method)
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(ProcessEngine processEngine, Method method, Deployment deploymentAnnotation)
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, Method method, Deployment deploymentAnnotation)
-
annotationDeploymentTearDown
public static void annotationDeploymentTearDown(ProcessEngine processEngine, String deploymentId, Class<?> testClass, String methodName)
-
annotationMockSupportSetup
public static void annotationMockSupportSetup(Class<?> testClass, String methodName, FlowableMockSupport mockSupport)
-
handleMockServiceTaskAnnotation
protected static void handleMockServiceTaskAnnotation(FlowableMockSupport mockSupport, Method method)
-
handleMockServiceTaskAnnotation
public static void handleMockServiceTaskAnnotation(FlowableMockSupport mockSupport, MockServiceTask mockedServiceTask)
-
handleMockServiceTasksAnnotation
protected static void handleMockServiceTasksAnnotation(FlowableMockSupport mockSupport, Method method)
-
handleNoOpServiceTasksAnnotation
protected static void handleNoOpServiceTasksAnnotation(FlowableMockSupport mockSupport, Method method)
-
handleNoOpServiceTasksAnnotation
public static void handleNoOpServiceTasksAnnotation(FlowableMockSupport mockSupport, NoOpServiceTasks noOpServiceTasks)
-
annotationMockSupportTeardown
public static void annotationMockSupportTeardown(FlowableMockSupport mockSupport)
-
getBpmnProcessDefinitionResource
public static String getBpmnProcessDefinitionResource(Class<?> type, String name)
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
public static ProcessEngine getProcessEngine(String configurationResource)
-
closeProcessEngines
public static void closeProcessEngines()
-
assertAndEnsureCleanDb
public static void assertAndEnsureCleanDb(ProcessEngine processEngine)
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)
-
-