Package org.dbunit
Class JdbcDatabaseTester
java.lang.Object
org.dbunit.assertion.SimpleAssert
org.dbunit.AbstractDatabaseTester
org.dbunit.JdbcDatabaseTester
- All Implemented Interfaces:
IDatabaseTester
- Direct Known Subclasses:
PropertiesBasedJdbcDatabaseTester
DatabaseTester that uses JDBC's Driver Manager to create connections.
- Since:
- 2.2
- Version:
- $Revision$
- Author:
- Andres Almiray (aalmiray@users.sourceforge.net), Felipe Leme (dbunit@felipeal.net)
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcDatabaseTester(String driverClass, String connectionUrl) Creates a new JdbcDatabaseTester with the specified properties.
Username and Password are set to null.JdbcDatabaseTester(String driverClass, String connectionUrl, String username, String password) Creates a new JdbcDatabaseTester with the specified properties.JdbcDatabaseTester(String driverClass, String connectionUrl, String username, String password, String schema) Creates a new JdbcDatabaseTester with the specified properties. -
Method Summary
Methods 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
-
Constructor Details
-
JdbcDatabaseTester
Creates a new JdbcDatabaseTester with the specified properties.
Username and Password are set to null.- Parameters:
driverClass- the classname of the JDBC driver to useconnectionUrl- the connection url- Throws:
ClassNotFoundException- If the givendriverClasswas not found
-
JdbcDatabaseTester
public JdbcDatabaseTester(String driverClass, String connectionUrl, String username, String password) throws ClassNotFoundException Creates a new JdbcDatabaseTester with the specified properties.- Parameters:
driverClass- the classname of the JDBC driver to useconnectionUrl- the connection urlusername- a username that can has access to the databasepassword- the user's password- Throws:
ClassNotFoundException- If the givendriverClasswas not found
-
JdbcDatabaseTester
public JdbcDatabaseTester(String driverClass, String connectionUrl, String username, String password, String schema) throws ClassNotFoundException Creates a new JdbcDatabaseTester with the specified properties.- Parameters:
driverClass- the classname of the JDBC driver to useconnectionUrl- the connection urlusername- a username that can has access to the database - can benullpassword- the user's password - can benullschema- the database schema to be tested - can benull- Throws:
ClassNotFoundException- If the givendriverClasswas not found- Since:
- 2.4.3
-
-
Method Details
-
getConnection
Description copied from interface:IDatabaseTesterReturns the test database connection.- Throws:
Exception
-
toString
- Overrides:
toStringin classAbstractDatabaseTester
-