Package org.flowable.dmn.engine.test
Class DmnTestHelper
- java.lang.Object
-
- org.flowable.dmn.engine.test.DmnTestHelper
-
public abstract class DmnTestHelper extends Object
- Author:
- Tijs Rademakers, Joram Barrez
-
-
Field Summary
Fields Modifier and Type Field Description static StringEMPTY_LINE
-
Constructor Summary
Constructors Constructor Description DmnTestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringannotationDeploymentSetUp(DmnEngine dmnEngine, Class<?> testClass, Method method, DmnDeployment dmnDeploymentAnnotation)static StringannotationDeploymentSetUp(DmnEngine dmnEngine, Class<?> testClass, Method method, DmnDeploymentAnnotation dmnDeploymentAnnotation)static StringannotationDeploymentSetUp(DmnEngine dmnEngine, Class<?> testClass, String methodName)static voidannotationDeploymentTearDown(DmnEngine dmnEngine, String deploymentId, Class<?> testClass, String methodName)static voidassertAndEnsureCleanDb(DmnEngine dmnEngine)Each test is assumed to clean up all DB content it entered.static voidcloseDmnEngines()protected static StringdeployResourceFromAnnotation(DmnEngine dmnEngine, Class<?> testClass, String methodName, Method method, String[] resources)static StringgetDmnDecisionResource(Class<?> type, String name)get a resource location by convention based on a class (type) and a relative resource name.static DmnEnginegetDmnEngine(String configurationResource)
-
-
-
Field Detail
-
EMPTY_LINE
public static final String EMPTY_LINE
- See Also:
- Constant Field Values
-
-
Method Detail
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(DmnEngine dmnEngine, Class<?> testClass, String methodName)
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(DmnEngine dmnEngine, Class<?> testClass, Method method, DmnDeployment dmnDeploymentAnnotation)
-
annotationDeploymentSetUp
public static String annotationDeploymentSetUp(DmnEngine dmnEngine, Class<?> testClass, Method method, DmnDeploymentAnnotation dmnDeploymentAnnotation)
-
deployResourceFromAnnotation
protected static String deployResourceFromAnnotation(DmnEngine dmnEngine, Class<?> testClass, String methodName, Method method, String[] resources)
-
annotationDeploymentTearDown
public static void annotationDeploymentTearDown(DmnEngine dmnEngine, String deploymentId, Class<?> testClass, String methodName)
-
getDmnDecisionResource
public static String getDmnDecisionResource(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:DmnDeployer.DMN_RESOURCE_SUFFIXES. The first resource matching a suffix will be returned.
-
closeDmnEngines
public static void closeDmnEngines()
-
assertAndEnsureCleanDb
public static void assertAndEnsureCleanDb(DmnEngine dmnEngine)
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.
-
-