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 |
areJobsAvailable(ProcessEngineConfigurationImpl processEngineConfiguration) |
static void |
assertAndEnsureCleanDb(ProcessEngine processEngine)
Ensures that the database is clean after the test.
|
static String |
assertAndEnsureCleanDb(ProcessEngine processEngine,
boolean fail)
Ensures that the database is clean after the test.
|
static void |
assertAndEnsureCleanDbAndCache(ProcessEngine processEngine) |
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 void |
assertProcessEnded(ProcessEngine processEngine,
String processInstanceId)
Deprecated.
|
static void |
clearOpLog(ProcessEngineConfigurationImpl processEngineConfiguration)
Required when user operations are logged that are not directly associated with a single deployment
(e.g.
|
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.
|
static ProcessEngine |
getProcessEngine(String configurationResource) |
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 void assertAndEnsureCleanDbAndCache(ProcessEngine processEngine)
public 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 void assertAndEnsureCleanDb(ProcessEngine processEngine)
processEngine
- the ProcessEngine
to checkAssertionError
- if the database was not cleanpublic static String assertAndEnsureCleanDb(ProcessEngine processEngine, boolean fail)
processEngine
- the ProcessEngine
to checkfail
- if true the method will throw an AssertionError
if the database is not cleanAssertionError
- if the database was not clean and fail is set to truepublic static void waitForJobExecutorToProcessAllJobs(ProcessEngineConfigurationImpl processEngineConfiguration, long maxMillisToWait, long intervalMillis)
public static boolean areJobsAvailable(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 clearOpLog(ProcessEngineConfigurationImpl processEngineConfiguration)
Copyright © 2018. All rights reserved.