public class JdbcDatabaseTester extends AbstractDatabaseTester
Constructor and Description |
---|
JdbcDatabaseTester(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.
|
Modifier and Type | Method and Description |
---|---|
IDatabaseConnection |
getConnection()
Returns the test database connection.
|
String |
toString() |
closeConnection, getDataSet, getSchema, getSetUpOperation, getTearDownOperation, onSetup, onTearDown, setDataSet, setOperationListener, setSchema, setSetUpOperation, setTearDownOperation
assertNotNull, assertNotNull, assertNotNullNorEmpty, assertTrue, assertTrue, fail
public JdbcDatabaseTester(String driverClass, String connectionUrl) throws ClassNotFoundException
driverClass
- the classname of the JDBC driver to useconnectionUrl
- the connection urlClassNotFoundException
- If the given driverClass
was not foundpublic JdbcDatabaseTester(String driverClass, String connectionUrl, String username, String password) throws ClassNotFoundException
driverClass
- the classname of the JDBC driver to useconnectionUrl
- the connection urlusername
- a username that can has access to the databasepassword
- the user's passwordClassNotFoundException
- If the given driverClass
was not foundpublic JdbcDatabaseTester(String driverClass, String connectionUrl, String username, String password, String schema) throws ClassNotFoundException
driverClass
- the classname of the JDBC driver to useconnectionUrl
- the connection urlusername
- 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
ClassNotFoundException
- If the given driverClass
was not foundpublic IDatabaseConnection getConnection() throws Exception
IDatabaseTester
Exception
public String toString()
toString
in class AbstractDatabaseTester
Copyright © 2002–2017. All rights reserved.