Package org.dbunit
Class DBTestCase
java.lang.Object
org.dbunit.DatabaseTestCase
org.dbunit.DBTestCase
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.InvocationInterceptor,org.junit.jupiter.api.extension.TestInstantiationAwareExtension
- Direct Known Subclasses:
DataSourceBasedDBTestCase,DefaultPrepAndExpectedTestCase,JdbcBasedDBTestCase,JndiBasedDBTestCase
Base testCase for database testing.
Subclasses may override
Default implementation uses a
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$
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor
org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T>Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension
org.junit.jupiter.api.extension.TestInstantiationAwareExtension.ExtensionContextScope -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final IDatabaseConnectionReturns the test database connection.protected IDatabaseTesterCreates a new IDatabaseTester.Methods inherited from class org.dbunit.DatabaseTestCase
closeConnection, getDatabaseTester, getDataSet, getName, getOperationListener, getSetUpOperation, getTearDownOperation, setUp, setUpDatabaseConfig, tearDownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor
interceptAfterAllMethod, interceptAfterEachMethod, interceptBeforeAllMethod, interceptBeforeEachMethod, interceptDynamicTest, interceptTestClassConstructor, interceptTestFactoryMethod, interceptTestMethod, interceptTestTemplateMethodMethods inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension
getTestInstantiationExtensionContextScope
-
Constructor Details
-
DBTestCase
public DBTestCase() -
DBTestCase
-
-
Method Details
-
getConnection
Description copied from class:DatabaseTestCaseReturns the test database connection.- Specified by:
getConnectionin classDatabaseTestCase- Throws:
Exception
-
newDatabaseTester
Creates a new IDatabaseTester. Default implementation returns aPropertiesBasedJdbcDatabaseTester.- Overrides:
newDatabaseTesterin classDatabaseTestCase- Throws:
Exception
-