public abstract class TestHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EMPTY_LINE |
static List<String> |
RESOURCE_SUFFIXES |
static List<String> |
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK |
Constructor and Description |
---|
TestHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
annotationDeploymentSetUp(ProcessEngine processEngine,
Class<?> testClass,
String methodName) |
static String |
annotationDeploymentSetUp(ProcessEngine processEngine,
Class<?> testClass,
String methodName,
Deployment deploymentAnnotation) |
static void |
annotationDeploymentTearDown(ProcessEngine processEngine,
String deploymentId,
Class<?> testClass,
String methodName) |
static boolean |
annotationRequiredHistoryLevelCheck(ProcessEngine processEngine,
Class<?> testClass,
String methodName) |
static boolean |
annotationRequiredHistoryLevelCheck(ProcessEngine processEngine,
org.junit.runner.Description description) |
static boolean |
areJobsAvailable(ProcessEngineConfigurationImpl processEngineConfiguration) |
static void |
assertAndEnsureCleanDbAndCache(ProcessEngine processEngine)
Ensures that the deployment cache and database is clean after a test.
|
static String |
assertAndEnsureCleanDbAndCache(ProcessEngine processEngine,
boolean fail)
Ensures that the deployment cache and database is clean after a test.
|
static void |
assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine)
Ensures that the deployment cache is empty after a test.
|
static String |
assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine,
boolean fail)
Ensures that the deployment cache is empty after a test.
|
static String |
assertAndEnsureNoProcessApplicationsRegistered(ProcessEngine processEngine) |
static void |
assertProcessEnded(ProcessEngine processEngine,
String processInstanceId)
Deprecated.
|
static void |
clearUserOperationLog(ProcessEngineConfigurationImpl processEngineConfiguration) |
static void |
closeProcessEngines() |
static void |
createOrUpdateHistoryLevel(ProcessEngineConfigurationImpl processEngineConfiguration) |
static void |
createSchema(ProcessEngineConfigurationImpl processEngineConfiguration) |
static void |
deleteDeployment(ProcessEngine processEngine,
String deploymentId) |
static void |
deleteHistoryLevel(ProcessEngineConfigurationImpl processEngineConfiguration) |
static void |
dropSchema(ProcessEngineConfigurationImpl processEngineConfiguration) |
static String |
getBpmnProcessDefinitionResource(Class<?> type,
String name)
get a resource location by convention based on a class (type) and a
relative resource name.
|
protected static Method |
getMethod(Class<?> clazz,
String methodName) |
static ProcessEngine |
getProcessEngine(String configurationResource) |
static void |
resetIdGenerator(ProcessEngineConfigurationImpl processEngineConfiguration) |
static void |
waitForJobExecutorToProcessAllJobs(ProcessEngineConfigurationImpl processEngineConfiguration,
long maxMillisToWait,
long intervalMillis) |
public static final String EMPTY_LINE
public static final List<String> TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK
@Deprecated public static void assertProcessEnded(ProcessEngine processEngine, String processInstanceId)
ProcessEngineAssert
instead.public static String annotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, String methodName, Deployment deploymentAnnotation)
public static String annotationDeploymentSetUp(ProcessEngine processEngine, Class<?> testClass, String methodName)
public static void annotationDeploymentTearDown(ProcessEngine processEngine, String deploymentId, Class<?> testClass, String methodName)
public static void deleteDeployment(ProcessEngine processEngine, String deploymentId)
public static String getBpmnProcessDefinitionResource(Class<?> type, String name)
BpmnDeployer.BPMN_RESOURCE_SUFFIXES
.
The first resource matching a suffix will be returned.public static boolean annotationRequiredHistoryLevelCheck(ProcessEngine processEngine, org.junit.runner.Description description)
public static boolean annotationRequiredHistoryLevelCheck(ProcessEngine processEngine, Class<?> testClass, String methodName)
protected static Method getMethod(Class<?> clazz, String methodName) throws SecurityException, NoSuchMethodException
public static void assertAndEnsureCleanDbAndCache(ProcessEngine processEngine)
processEngine
- the ProcessEngine
to testAssertionError
- if the deployment cache or database was not cleanpublic static String assertAndEnsureCleanDbAndCache(ProcessEngine processEngine, boolean fail)
processEngine
- the ProcessEngine
to testfail
- if true the method will throw an AssertionError
if the deployment cache or database is not cleanAssertionError
- if the deployment cache or database was not cleanpublic static void assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine)
processEngine
- the ProcessEngine
to testAssertionError
- if the deployment cache was not cleanpublic static String assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine, boolean fail)
processEngine
- the ProcessEngine
to testfail
- if true the method will throw an AssertionError
if the deployment cache is not cleanAssertionError
- if the deployment cache was not clean and fail is set to truepublic static String assertAndEnsureNoProcessApplicationsRegistered(ProcessEngine processEngine)
public static void waitForJobExecutorToProcessAllJobs(ProcessEngineConfigurationImpl processEngineConfiguration, long maxMillisToWait, long intervalMillis)
public static boolean areJobsAvailable(ProcessEngineConfigurationImpl processEngineConfiguration)
public static void resetIdGenerator(ProcessEngineConfigurationImpl processEngineConfiguration)
public static ProcessEngine getProcessEngine(String configurationResource)
public static void closeProcessEngines()
public static void createSchema(ProcessEngineConfigurationImpl processEngineConfiguration)
public static void dropSchema(ProcessEngineConfigurationImpl processEngineConfiguration)
public static void createOrUpdateHistoryLevel(ProcessEngineConfigurationImpl processEngineConfiguration)
public static void deleteHistoryLevel(ProcessEngineConfigurationImpl processEngineConfiguration)
public static void clearUserOperationLog(ProcessEngineConfigurationImpl processEngineConfiguration)
Copyright © 2017. All rights reserved.