Class DynamicTest

java.lang.Object
io.deephaven.enterprise.validation.dynamic.DynamicTest
All Implemented Interfaces:
Comparable<DynamicTest>

public class DynamicTest extends Object implements Comparable<DynamicTest>
A configuration defined data quality test case for DynamicValidator. These dynamic tests can be produced at runtime without users generating code.
  • Constructor Details

    • DynamicTest

      public DynamicTest(String methodName)
      Creates a new test.
      Parameters:
      methodName - name of the DynamicValidatorInterface method for the test.
  • Method Details

    • isAnnotationPresentClass

      public boolean isAnnotationPresentClass(Class<? extends Annotation> annotationClass)
    • getMethodName

      public String getMethodName()
      Gets the name of the DynamicValidatorInterface method for the test.
      Returns:
      name of the DynamicValidatorInterface method for the test.
    • isRunFullDatabase

      public boolean isRunFullDatabase()
      Indicates if the test should be run in TestValidationMode.FULL_DATABASE mode.
      Returns:
      true if the test should be run in TestValidationMode.FULL_DATABASE mode; false otherwise.
    • setRunFullDatabase

      public void setRunFullDatabase(boolean runFullDatabase)
      Sets if the test should be run in TestValidationMode.FULL_DATABASE mode.
      Parameters:
      runFullDatabase - true if the test should be run in TestValidationMode.FULL_DATABASE mode; false otherwise.
    • isRunSimpleTable

      public boolean isRunSimpleTable()
      Indicates if the test should be run in TestValidationMode.SIMPLE_TABLE mode.
      Returns:
      true if the test should be run in TestValidationMode.SIMPLE_TABLE mode; false otherwise.
    • setRunSimpleTable

      public void setRunSimpleTable(boolean runSimpleTable)
      Sets if the test should be run in TestValidationMode.SIMPLE_TABLE mode.
      Parameters:
      runSimpleTable - true if the test should be run in TestValidationMode.SIMPLE_TABLE mode; false otherwise.
    • addImports

      public void addImports(String... imports)
      Adds java imports for use in dynamic code generation.
      Parameters:
      imports - java imports for use in dynamic code generation.
    • parameter

      public void parameter(String name, String value)
      Adds a parameter for use when invoking the test method. During execution, the value strings will be dynamically converted to the appropriate type.
      Parameters:
      name - parameter name
      value - parameter value string
    • invoke

      Invoke the test.
      Parameters:
      validator - data validator to use when executing the test.
      Throws:
      InvocationTargetException - problem executing the test
      IllegalAccessException - problem executing the test
      InstantiationException
      NoSuchMethodException
    • compareTo

      public int compareTo(@NotNull @NotNull DynamicTest o)
      Specified by:
      compareTo in interface Comparable<DynamicTest>
    • toString

      public String toString()
      Overrides:
      toString in class Object