Package org.dbunit.annotation.runtime
Class VerifyTableDefinitionCatalog
java.lang.Object
org.dbunit.annotation.runtime.VerifyTableDefinitionCatalog
Reads one or more catalog classes named by
DbUnitConfig.verifyDefinitions() or
DbUnitExpected.verifyDefinitions() and indexes their VerifyTableDefinitions
by table name, for DbUnitExpected.verifyTables() to select from.
Each catalog class is read one of two ways: if it implements
VerifyTableDefinitionsProvider, it is reflectively instantiated with its no-arg
constructor and asked for its definitions; otherwise its public static final
VerifyTableDefinition fields are read directly. The same table name appearing in two
catalog classes is rejected rather than silently resolved by declaration order.
Not intended for direct use by test code; this is machinery consumed by
AnnotatedTestConfiguration.
- Since:
- 3.6.0
- Author:
- Jeff Jensen
-
Constructor Summary
ConstructorsConstructorDescriptionVerifyTableDefinitionCatalog(Class<?>... catalogClasses) Reads and merges the given catalog classes. -
Method Summary
Modifier and TypeMethodDescriptionSelects the named tables' definitions, or every definition in the catalog when no names are given.
-
Constructor Details
-
VerifyTableDefinitionCatalog
Reads and merges the given catalog classes.- Parameters:
catalogClasses- The catalog classes to read; each either implementsVerifyTableDefinitionsProvideror exposespublic static final VerifyTableDefinitionfields.
-
-
Method Details
-
select
Selects the named tables' definitions, or every definition in the catalog when no names are given.- Parameters:
tableNames- The table names to select; empty selects every definition in the catalog.- Returns:
- The selected definitions, in the order named (or catalog order, when every definition is selected).
- Throws:
IllegalStateException- When a named table is not present in the catalog.
-