|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.camunda.bpm.engine.impl.test.TestHelper
public abstract class TestHelper
Field Summary | |
---|---|
static String |
EMPTY_LINE
|
static List<String> |
RESOURCE_SUFFIXES
|
static List<String> |
TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK
|
Constructor Summary | |
---|---|
TestHelper()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EMPTY_LINE
public static final List<String> TABLENAMES_EXCLUDED_FROM_DB_CLEAN_CHECK
public static final List<String> RESOURCE_SUFFIXES
Constructor Detail |
---|
public TestHelper()
Method Detail |
---|
@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
SecurityException
NoSuchMethodException
public static void assertAndEnsureCleanDbAndCache(ProcessEngine processEngine)
processEngine
- the ProcessEngine
to test
AssertionError
- 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 clean
AssertionError
- if the deployment cache or database was not cleanpublic static void assertAndEnsureCleanDeploymentCache(ProcessEngine processEngine)
processEngine
- the ProcessEngine
to test
AssertionError
- 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 clean
AssertionError
- 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |