Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.dbunit
Class DatabaseTestCase  view DatabaseTestCase download DatabaseTestCase.java

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

public abstract class DatabaseTestCase
extends junit.framework.TestCase

Since:
Feb 17, 2002
Version:
$Revision: 1.11 $

Field Summary
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
DatabaseTestCase()
           
DatabaseTestCase(java.lang.String name)
           
 
Method Summary
protected  void closeConnection(org.dbunit.database.IDatabaseConnection connection)
          Close the specified connection.
private  void executeOperation(org.dbunit.operation.DatabaseOperation operation)
           
protected abstract  org.dbunit.database.IDatabaseConnection getConnection()
          Returns the test database connection.
protected abstract  org.dbunit.dataset.IDataSet getDataSet()
          Returns the test dataset.
protected  org.dbunit.operation.DatabaseOperation getSetUpOperation()
          Returns the database operation executed in test setup.
protected  org.dbunit.operation.DatabaseOperation getTearDownOperation()
          Returns the database operation executed in test cleanup.
protected  void setUp()
          Sets up the fixture, for example, open a network connection.
protected  void tearDown()
          Tears down the fixture, for example, close a network connection.
 
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 org.dbunit.database.IDatabaseConnection getConnection()
                                                                  throws java.lang.Exception
Returns the test database connection.


getDataSet

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


closeConnection

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


getSetUpOperation

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


getTearDownOperation

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


executeOperation

private void executeOperation(org.dbunit.operation.DatabaseOperation operation)
                       throws java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Sets up the fixture, for example, open a network connection. This method is called before a test is executed.


tearDown

protected void tearDown()
                 throws java.lang.Exception
Description copied from class: junit.framework.TestCase
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.