org.dbunit
Class DatabaseTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.dbunit.DatabaseTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class DatabaseTestCase
extends junit.framework.TestCase

Since:
Feb 17, 2002
Version:
$Revision: 1.11 $
Author:
Manuel Laflamme

Constructor Summary
DatabaseTestCase()
           
DatabaseTestCase(java.lang.String name)
           
 
Method Summary
protected  void closeConnection(IDatabaseConnection connection)
          Close the specified connection.
protected abstract  IDatabaseConnection getConnection()
          Returns the test database connection.
protected abstract  IDataSet getDataSet()
          Returns the test dataset.
protected  DatabaseOperation getSetUpOperation()
          Returns the database operation executed in test setup.
protected  DatabaseOperation getTearDownOperation()
          Returns the database operation executed in test cleanup.
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseTestCase

public DatabaseTestCase()

DatabaseTestCase

public DatabaseTestCase(java.lang.String name)
Method Detail

getConnection

protected abstract IDatabaseConnection getConnection()
                                              throws java.lang.Exception
Returns the test database connection.

Throws:
java.lang.Exception

getDataSet

protected abstract IDataSet getDataSet()
                                throws java.lang.Exception
Returns the test dataset.

Throws:
java.lang.Exception

closeConnection

protected void closeConnection(IDatabaseConnection connection)
                        throws java.lang.Exception
Close the specified connection. Ovverride this method of you want to keep your connection alive between tests.

Throws:
java.lang.Exception

getSetUpOperation

protected DatabaseOperation getSetUpOperation()
                                       throws java.lang.Exception
Returns the database operation executed in test setup.

Throws:
java.lang.Exception

getTearDownOperation

protected DatabaseOperation getTearDownOperation()
                                          throws java.lang.Exception
Returns the database operation executed in test cleanup.

Throws:
java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2002-2004 DbUnit.org. All Rights Reserved.