org.dbunit
Class JndiDatabaseTester

java.lang.Object
  extended by org.dbunit.AbstractDatabaseTester
      extended by org.dbunit.JndiDatabaseTester
All Implemented Interfaces:
IDatabaseTester

public class JndiDatabaseTester
extends AbstractDatabaseTester

DatabaseTester that pulls a DataSource from a JNDI location.

Author:
Andres Almiray

Nested Class Summary
 
Nested classes/interfaces inherited from class org.dbunit.AbstractDatabaseTester
AbstractDatabaseTester.AssertionFailedError
 
Constructor Summary
JndiDatabaseTester(java.util.Properties environment, java.lang.String lookupName)
          Creates a JndiDatabaseTester with specific JNDI properties.
JndiDatabaseTester(java.lang.String lookupName)
          Creates a JndiDatabaseTester with default JNDI properties.
 
Method Summary
 IDatabaseConnection getConnection()
          Returns the test database connection.
 
Methods inherited from class org.dbunit.AbstractDatabaseTester
assertNotNullNorEmpty, assertTrue, closeConnection, getDataSet, getSchema, getSetUpOperation, getTearDownOperation, onSetup, onTearDown, setDataSet, setSchema, setSetUpOperation, setTearDownOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JndiDatabaseTester

public JndiDatabaseTester(java.util.Properties environment,
                          java.lang.String lookupName)
Creates a JndiDatabaseTester with specific JNDI properties.

Parameters:
environment - A Properties object with JNDI properties
lookupName - the name of the resource in the JNDI context

JndiDatabaseTester

public JndiDatabaseTester(java.lang.String lookupName)
Creates a JndiDatabaseTester with default JNDI properties.

Parameters:
lookupName - the name of the resource in the JNDI context
Method Detail

getConnection

public IDatabaseConnection getConnection()
                                  throws java.lang.Exception
Description copied from interface: IDatabaseTester
Returns the test database connection.

Throws:
java.lang.Exception


Copyright © 2002-2008. All Rights Reserved.