public class JndiDatabaseTester extends AbstractDatabaseTester
Constructor and Description |
---|
JndiDatabaseTester(Properties environment,
String lookupName)
Creates a JndiDatabaseTester with specific JNDI properties.
|
JndiDatabaseTester(Properties environment,
String lookupName,
String schema)
Creates a JndiDatabaseTester with specific JNDI properties.
|
JndiDatabaseTester(String lookupName)
Creates a JndiDatabaseTester with default JNDI 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 JndiDatabaseTester(String lookupName)
lookupName
- the name of the resource in the JNDI contextpublic JndiDatabaseTester(Properties environment, String lookupName)
environment
- A Properties object with JNDI properties. Can be nulllookupName
- the name of the resource in the JNDI contextpublic JndiDatabaseTester(Properties environment, String lookupName, String schema)
environment
- A Properties object with JNDI properties. Can be null
lookupName
- the name of the resource in the JNDI contextschema
- The schema name to be used for new dbunit connections. Can be null
public IDatabaseConnection getConnection() throws Exception
IDatabaseTester
Exception
public String toString()
toString
in class AbstractDatabaseTester
Copyright © 2002–2018. All rights reserved.