org.osesb.utilities.junit
Class DBUnitDataSetFileGenerator
java.lang.Object
org.osesb.utilities.junit.DBUnitDataSetFileGenerator
public class DBUnitDataSetFileGenerator
- extends java.lang.Object
Utility for generating DbUnit dataset files from a database. DbUnit dataset
files are used by the DbUnit API to setUp(), tearDown(), and assert results
for tests that involve databases. Typically, a DbUnit dataset file is specified
in the XML configuration file for descendants of OSESBDBUnitTestCase.
This utility loads a configuration that specifies:
- JDBCConfiguration file, which is used to establish the database connection.
- The destination path to the DbUnit DataSet file to be created.
- The names of the Tables to include in the DbUnit DataSet.
- Optionally, the vendor-specifc DbUnit database connection class. DbUnit
vendor-specific classes are in the org.dbunit.ext package. If not specified,
the default DbUnit connection class is used. Generally, users should specify the
appropriate vendor-specific connection class.
- Since:
- Version .9
|
Field Summary |
protected static org.apache.commons.logging.Log |
log
The logging implementation for this class. |
|
Method Summary |
static void |
main(java.lang.String[] args)
Generates a DbUnit data set file from a database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
- The logging implementation for this class.
DBUnitDataSetFileGenerator
public DBUnitDataSetFileGenerator()
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Generates a DbUnit data set file from a database.
- Parameters:
args - commandline arguments
- Throws:
java.lang.Exception