net.sf.oness.common.model.testing
Class SpringDatabaseTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.dbunit.DatabaseTestCase
              extended bynet.sf.oness.common.model.testing.SpringDatabaseTestCase
All Implemented Interfaces:
junit.framework.Test

public abstract class SpringDatabaseTestCase
extends org.dbunit.DatabaseTestCase

DatabaseTestCase base class that uses Spring DataSource

Version:
$Revision: 1.8 $
Author:
Carlos Sanchez

Constructor Summary
SpringDatabaseTestCase()
           
SpringDatabaseTestCase(java.lang.String name)
           
 
Method Summary
protected  org.dbunit.database.IDatabaseConnection getConnection()
          Gets connection from DataSource defined ApplicationContext with bean name "dataSource"
protected  org.dbunit.dataset.IDataSet getDataSet()
          Gets dataset from xml file "dbunit.xml" or "src/test/dbunit.xml", or xls files "dbunit.xls" or "src/test/dbunit.xls", the first that exists.
 
Methods inherited from class org.dbunit.DatabaseTestCase
closeConnection, getSetUpOperation, getTearDownOperation, setUp, 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

SpringDatabaseTestCase

public SpringDatabaseTestCase()

SpringDatabaseTestCase

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

getConnection

protected org.dbunit.database.IDatabaseConnection getConnection()
                                                         throws java.lang.Exception
Gets connection from DataSource defined ApplicationContext with bean name "dataSource"

Throws:
java.lang.Exception
See Also:
DatabaseTestCase.getConnection()

getDataSet

protected org.dbunit.dataset.IDataSet getDataSet()
                                          throws java.lang.Exception
Gets dataset from xml file "dbunit.xml" or "src/test/dbunit.xml", or xls files "dbunit.xls" or "src/test/dbunit.xls", the first that exists.

Throws:
java.lang.Exception
See Also:
DatabaseTestCase.getDataSet()


Copyright © 2003-2005 ONess Project. All Rights Reserved.