org.dbunit
Class AbstractDatabaseTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.dbunit.DatabaseTestCase
              extended by org.dbunit.AbstractDatabaseTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractBatchOperationTest, AbstractDatabaseConnectionTest, CloseConnectionOperationTest, CompositeOperationTest, DatabaseTableMetaDataTest, DeleteAllOperationTest, DeleteOperationTest, InsertIdentityOperationTest, InsertOperationTest, RefreshOperationTest, ResultSetTableMetaDataTest, TransactionOperationTest, UpdateOperationTest

public abstract class AbstractDatabaseTest
extends DatabaseTestCase

Since:
Feb 18, 2002
Version:
$Revision: 788 $
Author:
Manuel Laflamme

Field Summary
protected  IDatabaseConnection _connection
           
protected  org.slf4j.Logger logger
           
 
Constructor Summary
AbstractDatabaseTest(String s)
           
 
Method Summary
protected  void closeConnection(IDatabaseConnection connection)
           
protected  ITable createOrderedTable(String tableName, String orderByColumn)
           
static boolean environmentHasFeature(TestFeature feature)
           
protected  IDatabaseConnection getConnection()
           
protected  IDatabaseTester getDatabaseTester()
           
protected  IDataSet getDataSet()
           
protected  DatabaseEnvironment getEnvironment()
           
protected  void runTest()
           
protected  boolean runTest(String testName)
          This method is used so sub-classes can disable the tests according to some characteristics of the environment
protected  void setUp()
           
protected  void tearDown()
           
 
Methods inherited from class org.dbunit.DatabaseTestCase
getSetUpOperation, getTearDownOperation, newDatabaseTester
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_connection

protected IDatabaseConnection _connection

logger

protected final org.slf4j.Logger logger
Constructor Detail

AbstractDatabaseTest

public AbstractDatabaseTest(String s)
Method Detail

getEnvironment

protected DatabaseEnvironment getEnvironment()
                                      throws Exception
Throws:
Exception

createOrderedTable

protected ITable createOrderedTable(String tableName,
                                    String orderByColumn)
                             throws Exception
Throws:
Exception

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class DatabaseTestCase
Throws:
Exception

getDatabaseTester

protected IDatabaseTester getDatabaseTester()
                                     throws Exception
Overrides:
getDatabaseTester in class DatabaseTestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class DatabaseTestCase
Throws:
Exception

getConnection

protected IDatabaseConnection getConnection()
                                     throws Exception
Specified by:
getConnection in class DatabaseTestCase
Throws:
Exception

getDataSet

protected IDataSet getDataSet()
                       throws Exception
Specified by:
getDataSet in class DatabaseTestCase
Throws:
Exception

closeConnection

protected void closeConnection(IDatabaseConnection connection)
                        throws Exception
Overrides:
closeConnection in class DatabaseTestCase
Throws:
Exception

runTest

protected boolean runTest(String testName)
This method is used so sub-classes can disable the tests according to some characteristics of the environment

Parameters:
testName - name of the test to be checked
Returns:
flag indicating if the test should be executed or not

runTest

protected void runTest()
                throws Throwable
Overrides:
runTest in class junit.framework.TestCase
Throws:
Throwable

environmentHasFeature

public static boolean environmentHasFeature(TestFeature feature)


Copyright © 2002-2012. All Rights Reserved.