public abstract class DatabaseTestCase extends Object implements org.junit.jupiter.api.extension.InvocationInterceptor
DBTestCase
.Modifier | Constructor and Description |
---|---|
protected |
DatabaseTestCase() |
protected |
DatabaseTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeConnection(IDatabaseConnection connection)
Deprecated.
since 2.4.4 define a user defined
getOperationListener() in advance |
protected abstract IDatabaseConnection |
getConnection()
Returns the test database connection.
|
protected IDatabaseTester |
getDatabaseTester()
Gets the IDatabaseTester for this testCase.
If the IDatabaseTester is not set yet, this method calls newDatabaseTester() to obtain a new instance. |
protected abstract IDataSet |
getDataSet()
Returns the test dataset.
|
String |
getName() |
protected IOperationListener |
getOperationListener() |
protected DatabaseOperation |
getSetUpOperation()
Returns the database operation executed in test setup.
|
protected DatabaseOperation |
getTearDownOperation()
Returns the database operation executed in test cleanup.
|
protected IDatabaseTester |
newDatabaseTester()
Creates a IDatabaseTester for this testCase.
A DefaultDatabaseTester is used by default. |
protected void |
setUp() |
protected void |
setUpDatabaseConfig(DatabaseConfig config)
Designed to be overridden by subclasses in order to set additional configuration
parameters for the
IDatabaseConnection . |
protected void |
tearDown() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
interceptAfterAllMethod, interceptAfterEachMethod, interceptBeforeAllMethod, interceptBeforeEachMethod, interceptDynamicTest, interceptDynamicTest, interceptTestClassConstructor, interceptTestFactoryMethod, interceptTestMethod, interceptTestTemplateMethod
protected DatabaseTestCase()
protected DatabaseTestCase(String name)
public String getName()
protected abstract IDatabaseConnection getConnection() throws Exception
Exception
protected abstract IDataSet getDataSet() throws Exception
Exception
protected IDatabaseTester newDatabaseTester() throws Exception
DefaultDatabaseTester
is used by default.Exception
protected void setUpDatabaseConfig(DatabaseConfig config)
IDatabaseConnection
.config
- The settings of the current IDatabaseConnection
to be configuredprotected IDatabaseTester getDatabaseTester() throws Exception
Exception
@Deprecated protected void closeConnection(IDatabaseConnection connection) throws Exception
getOperationListener()
in advanceException
protected DatabaseOperation getSetUpOperation() throws Exception
Exception
protected DatabaseOperation getTearDownOperation() throws Exception
Exception
protected IOperationListener getOperationListener()
IOperationListener
to be used by the IDatabaseTester
.Copyright © 2002–2025. All rights reserved.