org.dbunit
Interface IDatabaseTester

All Known Implementing Classes:
AbstractDatabaseTester, DataSourceDatabaseTester, DefaultDatabaseTester, JdbcDatabaseTester, JndiDatabaseTester, PropertiesBasedJdbcDatabaseTester

public interface IDatabaseTester

This interface defines the behavior of a DatabaseTester, which is responsible for adding DBUnit features as composition on existing test cases (instead of extending DBTestCase directly).

Since:
2.2.0
Version:
$Revision: 766 $ $Date: 2008-08-01 13:05:20 +0200 (Fri, 01 Aug 2008) $
Author:
Andres Almiray (aalmiray@users.sourceforge.net), Last changed by: $Author: gommma $

Method Summary
 void closeConnection(IDatabaseConnection connection)
          Close the specified connection.
 IDatabaseConnection getConnection()
          Returns the test database connection.
 IDataSet getDataSet()
          Returns the test dataset.
 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.
 

Method Detail

closeConnection

void closeConnection(IDatabaseConnection connection)
                     throws Exception
Close the specified connection.

Throws:
Exception

getConnection

IDatabaseConnection getConnection()
                                  throws Exception
Returns the test database connection.

Throws:
Exception

getDataSet

IDataSet getDataSet()
Returns the test dataset.


setDataSet

void setDataSet(IDataSet dataSet)
Sets the test dataset to use.


setSchema

void setSchema(String schema)
Sets the schema value.


setSetUpOperation

void setSetUpOperation(DatabaseOperation setUpOperation)
Sets the DatabaseOperation to call when starting the test.


setTearDownOperation

void setTearDownOperation(DatabaseOperation tearDownOperation)
Sets the DatabaseOperation to call when ending the test.


onSetup

void onSetup()
             throws Exception
TestCases must call this method inside setUp()

Throws:
Exception

onTearDown

void onTearDown()
                throws Exception
TestCases must call this method inside tearDown()

Throws:
Exception


Copyright © 2002-2012. All Rights Reserved.