Package org.dbunit
Class JdbcBasedDBTestCase
java.lang.Object
org.dbunit.DatabaseTestCase
org.dbunit.DBTestCase
org.dbunit.JdbcBasedDBTestCase
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.InvocationInterceptor,org.junit.jupiter.api.extension.TestInstantiationAwareExtension
TestCase that uses a JdbcDatabaseTester.
- Since:
- 2.2.0
- Version:
- $Revision$ $Date$
- Author:
- Andres Almiray (aalmiray@users.sourceforge.net), 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 abstract StringReturns the test connection url.protected abstract StringReturns the JDBC driver classname.protected StringReturns the password for the connection.
Subclasses may override this method to provide a custom password.
Default implementations returns null.protected StringReturns the username for the connection.
Subclasses may override this method to provide a custom username.
Default implementations returns null.protected IDatabaseTesterCreates a new IDatabaseTester.
Default implementation returns aJdbcDatabaseTesterconfigured with the values returned fromgetDriverClass(),getConnectionUrl(),getUsername()andgetPassword().Methods inherited from class org.dbunit.DBTestCase
getConnectionMethods 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
-
JdbcBasedDBTestCase
public JdbcBasedDBTestCase() -
JdbcBasedDBTestCase
-
-
Method Details
-
newDatabaseTester
Creates a new IDatabaseTester.
Default implementation returns aJdbcDatabaseTesterconfigured with the values returned fromgetDriverClass(),getConnectionUrl(),getUsername()andgetPassword().- Overrides:
newDatabaseTesterin classDBTestCase- Throws:
ClassNotFoundException- when the driverClass was not found
-
getConnectionUrl
Returns the test connection url. -
getDriverClass
Returns the JDBC driver classname. -
getPassword
Returns the password for the connection.
Subclasses may override this method to provide a custom password.
Default implementations returns null. -
getUsername
Returns the username for the connection.
Subclasses may override this method to provide a custom username.
Default implementations returns null.
-