Package org.dbunit
Class PropertiesBasedJdbcDatabaseTester
java.lang.Object
org.dbunit.assertion.SimpleAssert
org.dbunit.AbstractDatabaseTester
org.dbunit.JdbcDatabaseTester
org.dbunit.PropertiesBasedJdbcDatabaseTester
- All Implemented Interfaces:
IDatabaseTester
DatabaseTester that configures a DriverManager from environment properties.
This class defines a set of keys for system properties that need to be present in the environment before using it. Example:
System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_DRIVER_CLASS,
"com.mycompany.myDriver" );
System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_CONNECTION_URL,
"jdbc:mydb://host/dbname" );
System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_USERNAME,
"myuser" );
System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_PASSWORD,
"mypasswd" );
System.setProperty( PropertiesBasedJdbcDatabaseTester.DBUNIT_SCHEMA,
"myschema" );
This class defines a set of keys for system properties that need to be present in the environment before using it. Example:
- Since:
- 2.2.0
- Version:
- $Revision$ $Date$
- Author:
- Andres Almiray(aalmiray@users.sourceforge.net), Felipe Leme (dbunit@felipeal.net), Last changed by: $Author$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA key for property that defines the connection urlstatic final StringA key for property that defines the driver classnamestatic final StringA key for property that defines the user's passwordstatic final StringA key for property that defines the database schemastatic final StringA key for property that defines the username -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newJdbcDatabaseTesterusing specificSystem.getProperty(String)values as initialization parameters -
Method Summary
Methods inherited from class org.dbunit.JdbcDatabaseTester
getConnection, toStringMethods inherited from class org.dbunit.AbstractDatabaseTester
closeConnection, getDataSet, getSchema, getSetUpOperation, getTearDownOperation, onSetup, onTearDown, setDataSet, setOperationListener, setSchema, setSetUpOperation, setTearDownOperationMethods inherited from class org.dbunit.assertion.SimpleAssert
assertNotNull, assertNotNull, assertNotNullNorEmpty, assertTrue, assertTrue, fail
-
Field Details
-
DBUNIT_CONNECTION_URL
A key for property that defines the connection url- See Also:
-
DBUNIT_DRIVER_CLASS
A key for property that defines the driver classname- See Also:
-
DBUNIT_PASSWORD
A key for property that defines the user's password- See Also:
-
DBUNIT_USERNAME
A key for property that defines the username- See Also:
-
DBUNIT_SCHEMA
A key for property that defines the database schema- See Also:
-
-
Constructor Details
-
PropertiesBasedJdbcDatabaseTester
Creates a newJdbcDatabaseTesterusing specificSystem.getProperty(String)values as initialization parameters- Throws:
Exception
-