org.dbunit
Class DBTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.dbunit.DatabaseTestCase
              extended by org.dbunit.DBTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
DataSourceBasedDBTestCase, DefaultPrepAndExpectedTestCase, JdbcBasedDBTestCase, JndiBasedDBTestCase

public abstract class DBTestCase
extends DatabaseTestCase

Base testCase for database testing.
Subclasses may override newDatabaseTester() to plug-in a different implementation of IDatabaseTester.
Default implementation uses a PropertiesBasedJdbcDatabaseTester.

Since:
2.2.0
Version:
$Revision$ $Date$
Author:
Felipe Leme (dbunit@felipeal.net), Last changed by: $Author$

Constructor Summary
DBTestCase()
           
DBTestCase(String name)
           
 
Method Summary
protected  IDatabaseConnection getConnection()
          Returns the test database connection.
protected  IDatabaseTester newDatabaseTester()
          Creates a new IDatabaseTester.
 
Methods inherited from class org.dbunit.DatabaseTestCase
closeConnection, getDatabaseTester, getDataSet, getOperationListener, getSetUpOperation, getTearDownOperation, setUp, setUpDatabaseConfig, tearDown
 
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBTestCase

public DBTestCase()

DBTestCase

public DBTestCase(String name)
Method Detail

getConnection

protected final IDatabaseConnection getConnection()
                                           throws Exception
Description copied from class: DatabaseTestCase
Returns the test database connection.

Specified by:
getConnection in class DatabaseTestCase
Throws:
Exception

newDatabaseTester

protected IDatabaseTester newDatabaseTester()
                                     throws Exception
Creates a new IDatabaseTester. Default implementation returns a PropertiesBasedJdbcDatabaseTester.

Overrides:
newDatabaseTester in class DatabaseTestCase
Throws:
Exception


Copyright © 2002–2014. All rights reserved.