Package org.flowable.eventregistry.test
Class EventTestHelper
- java.lang.Object
-
- org.flowable.eventregistry.test.EventTestHelper
-
public abstract class EventTestHelper extends Object
- Author:
- Tijs Rademakers, Joram Barrez
-
-
Field Summary
Fields Modifier and Type Field Description static StringEMPTY_LINE
-
Constructor Summary
Constructors Constructor Description EventTestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringannotationDeploymentSetUp(EventRepositoryService eventRepositoryService, Class<?> testClass, Method method, EventDeploymentAnnotation eventDeploymentAnnotation, ChannelDeploymentAnnotation channelDeploymentAnnotation)static StringannotationDeploymentSetUp(EventRepositoryService eventRepositoryService, Class<?> testClass, String methodName)static voidannotationDeploymentTearDown(EventRepositoryService eventRepositoryService, String deploymentId, Class<?> testClass, String methodName)static voidassertAndEnsureCleanDb(EventRegistryEngine eventRegistryEngine)Each test is assumed to clean up all DB content it entered.static voidcloseEventRegistryEngines()static StringgetChannelResource(Class<?> type, String name)get a resource location by convention based on a class (type) and a relative resource name.static EventRegistryEnginegetEventRegistryEngine(String configurationResource)static StringgetEventResource(Class<?> type, String name)get a resource location by convention based on a class (type) and a relative resource name.
-
-
-
Field Detail
-
EMPTY_LINE
public static final String EMPTY_LINE
- See Also:
- Constant Field Values
-
-
Method Detail
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(EventRepositoryService eventRepositoryService, Class<?> testClass, String methodName)
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(EventRepositoryService eventRepositoryService, Class<?> testClass, Method method, EventDeploymentAnnotation eventDeploymentAnnotation, ChannelDeploymentAnnotation channelDeploymentAnnotation)
-
annotationDeploymentTearDown
public static void annotationDeploymentTearDown(EventRepositoryService eventRepositoryService, String deploymentId, Class<?> testClass, String methodName)
-
getEventResource
public static String getEventResource(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:EventDeployer.EVENT_RESOURCE_SUFFIXES. The first resource matching a suffix will be returned.
-
getChannelResource
public static String getChannelResource(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:EventDeployer.CHANNEL_RESOURCE_SUFFIXES. The first resource matching a suffix will be returned.
-
getEventRegistryEngine
public static EventRegistryEngine getEventRegistryEngine(String configurationResource)
-
closeEventRegistryEngines
public static void closeEventRegistryEngines()
-
assertAndEnsureCleanDb
public static void assertAndEnsureCleanDb(EventRegistryEngine eventRegistryEngine)
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.
-
-