Package com.flowable.form.engine.test
Class FormTestHelper
java.lang.Object
com.flowable.form.engine.test.FormTestHelper
public abstract class FormTestHelper
extends java.lang.Object
- Author:
- Tijs Rademakers, Joram Barrez
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EMPTY_LINE
-
Constructor Summary
Constructors Constructor Description FormTestHelper()
-
Method Summary
Modifier and Type Method Description static java.lang.String
annotationDeploymentSetUp(FormEngine formEngine, java.lang.Class<?> testClass, java.lang.reflect.Method method, FormDeploymentAnnotation deploymentAnnotation)
static java.lang.String
annotationDeploymentSetUp(FormEngine formEngine, java.lang.Class<?> testClass, java.lang.String methodName)
static void
annotationDeploymentTearDown(FormEngine formEngine, java.lang.String deploymentId, java.lang.Class<?> testClass, java.lang.String methodName)
static void
assertAndEnsureCleanDb(FormEngine formEngine)
Each test is assumed to clean up all DB content it entered.static void
closeFormEngines()
static FormEngine
getFormEngine(java.lang.String configurationResource)
static java.lang.String
getFormResource(java.lang.Class<?> type, java.lang.String name)
get a resource location by convention based on a class (type) and a relative resource name.
-
Field Details
-
EMPTY_LINE
public static final java.lang.String EMPTY_LINE- See Also:
- Constant Field Values
-
-
Constructor Details
-
FormTestHelper
public FormTestHelper()
-
-
Method Details
-
annotationDeploymentSetUp
public static java.lang.String annotationDeploymentSetUp(FormEngine formEngine, java.lang.Class<?> testClass, java.lang.String methodName) -
annotationDeploymentSetUp
public static java.lang.String annotationDeploymentSetUp(FormEngine formEngine, java.lang.Class<?> testClass, java.lang.reflect.Method method, FormDeploymentAnnotation deploymentAnnotation) -
annotationDeploymentTearDown
public static void annotationDeploymentTearDown(FormEngine formEngine, java.lang.String deploymentId, java.lang.Class<?> testClass, java.lang.String methodName) -
getFormResource
public static java.lang.String getFormResource(java.lang.Class<?> type, java.lang.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:ParsedDeploymentBuilder.FORM_RESOURCE_SUFFIXES
. The first resource matching a suffix will be returned. -
getFormEngine
-
closeFormEngines
public static void closeFormEngines() -
assertAndEnsureCleanDb
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.
-