Annotation Interface DbUnitVerifyTable


@Target({}) @Retention(RUNTIME) @Documented public @interface DbUnitVerifyTable
Full per-table verification rules for one table, nested inside DbUnitExpected.verify(): column include/exclude filters, value comparers, and sort mode. Maps directly onto a VerifyTableDefinition.

An empty include() (the default) means include every column, since an annotation cannot express null and VerifyTableDefinition distinguishes null (include all) from an empty array (include nothing) - the latter being a degenerate setting nobody wants, so it is not expressible here.

For a shared, reusable table definition - especially one needing a configured ValueComparer instance that has no no-arg constructor - prefer a VerifyTableDefinitionsProvider catalog over this inline form; see DbUnitExpected.verifyDefinitions().

Since:
3.6.0
Author:
Jeff Jensen
See Also:
  • Element Details

    • value

      String value
      The name of the table to verify.
      Returns:
      The table name.
    • exclude

      String[] exclude
      Column names to exclude from comparison. Composes with include() when both are set: the included set, minus these.
      Returns:
      The column names to exclude; empty (the default) excludes none.
      Default:
      {}
    • include

      String[] include
      Column names to include in comparison, to the exclusion of all others.
      Returns:
      The column names to include; empty (the default) includes every column.
      Default:
      {}
    • defaultComparer

      Class<? extends ValueComparer> defaultComparer
      The ValueComparer to use for columns not named in columnComparers(), instantiated with its no-arg constructor and cached for the JVM's entire lifetime, keyed by class - see DbUnitColumnComparer for the resulting purity requirement on a custom ValueComparer.
      Returns:
      The default comparer class; the interface itself (the default) means "not set", leaving dbUnit's own default comparer in effect.
      Default:
      org.dbunit.assertion.comparer.value.ValueComparer.class
    • columnComparers

      DbUnitColumnComparer[] columnComparers
      Per-column ValueComparer overrides.
      Returns:
      The column comparer bindings; empty (the default) applies defaultComparer() to every column.
      Default:
      {}
    • sortOnFilteredColumnsOnly

      boolean sortOnFilteredColumnsOnly
      Whether to sort the expected and actual tables by only this table's filtered columns (post exclude/include) instead of by all of the actual table's native columns.
      Returns:
      True to sort by only the filtered columns; defaults to false.
      See Also:
      Default:
      false