Package org.dbunit

Class JdbcDatabaseTester

All Implemented Interfaces:
IDatabaseTester
Direct Known Subclasses:
PropertiesBasedJdbcDatabaseTester

public class JdbcDatabaseTester extends AbstractDatabaseTester
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 Details

    • JdbcDatabaseTester

      public JdbcDatabaseTester(String driverClass, String connectionUrl) throws ClassNotFoundException
      Creates a new JdbcDatabaseTester with the specified properties.
      Username and Password are set to null.
      Parameters:
      driverClass - the classname of the JDBC driver to use
      connectionUrl - the connection url
      Throws:
      ClassNotFoundException - If the given driverClass was 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 use
      connectionUrl - the connection url
      username - a username that can has access to the database
      password - the user's password
      Throws:
      ClassNotFoundException - If the given driverClass was 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 use
      connectionUrl - the connection url
      username - a username that can has access to the database - can be null
      password - the user's password - can be null
      schema - the database schema to be tested - can be null
      Throws:
      ClassNotFoundException - If the given driverClass was not found
      Since:
      2.4.3
  • Method Details