org.dbunit
Class AbstractDatabaseTester

java.lang.Object
  extended by org.dbunit.assertion.SimpleAssert
      extended by org.dbunit.AbstractDatabaseTester
All Implemented Interfaces:
IDatabaseTester
Direct Known Subclasses:
DataSourceDatabaseTester, DefaultDatabaseTester, JdbcDatabaseTester, JndiDatabaseTester

public abstract class AbstractDatabaseTester
extends SimpleAssert
implements IDatabaseTester

Basic implementation of IDatabaseTester.
Implementations of IDatabaseTester may use this class as a starting point.

Since:
2.2.0
Version:
$Revision: 864 $ $Date: 2008-11-07 15:27:26 +0100 (Fri, 07 Nov 2008) $
Author:
Andres Almiray (aalmiray@users.sourceforge.net), Last changed by: $Author: gommma $

Constructor Summary
AbstractDatabaseTester()
           
 
Method Summary
 void closeConnection(IDatabaseConnection connection)
          Close the specified connection.
 IDataSet getDataSet()
          Returns the test dataset.
protected  String getSchema()
          Returns the schema value.
protected  DatabaseOperation getSetUpOperation()
          Returns the DatabaseOperation to call when starting the test.
protected  DatabaseOperation getTearDownOperation()
          Returns the DatabaseOperation to call when ending the test.
 void onSetup()
          TestCases must call this method inside setUp()
 void onTearDown()
          TestCases must call this method inside tearDown()
 void setDataSet(IDataSet dataSet)
          Sets the test dataset to use.
 void setSchema(String schema)
          Sets the schema value.
 void setSetUpOperation(DatabaseOperation setUpOperation)
          Sets the DatabaseOperation to call when starting the test.
 void setTearDownOperation(DatabaseOperation tearDownOperation)
          Sets the DatabaseOperation to call when ending the test.
 String toString()
           
 
Methods inherited from class org.dbunit.assertion.SimpleAssert
assertNotNull, assertNotNull, assertNotNullNorEmpty, assertTrue, assertTrue, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.dbunit.IDatabaseTester
getConnection
 

Constructor Detail

AbstractDatabaseTester

public AbstractDatabaseTester()
Method Detail

closeConnection

public void closeConnection(IDatabaseConnection connection)
                     throws Exception
Description copied from interface: IDatabaseTester
Close the specified connection.

Specified by:
closeConnection in interface IDatabaseTester
Throws:
Exception

getDataSet

public IDataSet getDataSet()
Description copied from interface: IDatabaseTester
Returns the test dataset.

Specified by:
getDataSet in interface IDatabaseTester

onSetup

public void onSetup()
             throws Exception
Description copied from interface: IDatabaseTester
TestCases must call this method inside setUp()

Specified by:
onSetup in interface IDatabaseTester
Throws:
Exception

onTearDown

public void onTearDown()
                throws Exception
Description copied from interface: IDatabaseTester
TestCases must call this method inside tearDown()

Specified by:
onTearDown in interface IDatabaseTester
Throws:
Exception

setDataSet

public void setDataSet(IDataSet dataSet)
Description copied from interface: IDatabaseTester
Sets the test dataset to use.

Specified by:
setDataSet in interface IDatabaseTester

setSchema

public void setSchema(String schema)
Description copied from interface: IDatabaseTester
Sets the schema value.

Specified by:
setSchema in interface IDatabaseTester

setSetUpOperation

public void setSetUpOperation(DatabaseOperation setUpOperation)
Description copied from interface: IDatabaseTester
Sets the DatabaseOperation to call when starting the test.

Specified by:
setSetUpOperation in interface IDatabaseTester

setTearDownOperation

public void setTearDownOperation(DatabaseOperation tearDownOperation)
Description copied from interface: IDatabaseTester
Sets the DatabaseOperation to call when ending the test.

Specified by:
setTearDownOperation in interface IDatabaseTester

getSchema

protected String getSchema()
Returns the schema value.


getSetUpOperation

protected DatabaseOperation getSetUpOperation()
Returns the DatabaseOperation to call when starting the test.


getTearDownOperation

protected DatabaseOperation getTearDownOperation()
Returns the DatabaseOperation to call when ending the test.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2012. All Rights Reserved.