Class DmnTestHelper

java.lang.Object
org.flowable.dmn.engine.test.DmnTestHelper

public abstract class DmnTestHelper extends Object
Author:
Tijs Rademakers, Joram Barrez
  • Field Details

  • Constructor Details

    • DmnTestHelper

      public DmnTestHelper()
  • Method Details

    • 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.
    • getDmnEngine

      public static DmnEngine getDmnEngine(String configurationResource)
    • 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.