Package org.dbunit
Class AbstractDatabaseIT
java.lang.Object
org.dbunit.DatabaseTestCase
org.dbunit.AbstractDatabaseIT
- All Implemented Interfaces:
org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.InvocationInterceptor,org.junit.jupiter.api.extension.TestInstantiationAwareExtension
- Direct Known Subclasses:
DeleteOperationIT,InsertOperationIT,TruncateTableOperationIT
- Since:
- Feb 18, 2002
- Version:
- $Revision$
- Author:
- Manuel Laflamme
-
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 -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcloseConnection(IDatabaseConnection connection) protected StringconvertString(String str) Returns the string converted as an identifier according to the metadata rules of the database environment.protected ITablecreateOrderedTable(String tableName, String orderByColumn) static booleanenvironmentHasFeature(TestFeature feature) protected IDatabaseConnectionprotected IDatabaseTesterprotected IDataSetprotected DatabaseEnvironmentprotected voidrunTest()protected booleanThis method is used so sub-classes can disable the tests according to some characteristics of the environmentprotected voidsetUp()protected voidsetUpDatabaseConfig(DatabaseConfig config) protected voidtearDown()Methods inherited from class org.dbunit.DatabaseTestCase
getName, getOperationListener, getSetUpOperation, getTearDownOperation, newDatabaseTesterMethods 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
-
Field Details
-
_connection
-
logger
protected final org.slf4j.Logger logger
-
-
Constructor Details
-
AbstractDatabaseIT
public AbstractDatabaseIT()
-
-
Method Details
-
getEnvironment
- Throws:
Exception
-
createOrderedTable
- Throws:
Exception
-
convertString
Returns the string converted as an identifier according to the metadata rules of the database environment. Most databases convert all metadata identifiers to uppercase. PostgreSQL converts identifiers to lowercase. MySQL preserves case.- Parameters:
str- The identifier.- Returns:
- The identifier converted according to database rules.
- Throws:
Exception
-
setUp
- Overrides:
setUpin classDatabaseTestCase- Throws:
Exception
-
getDatabaseTester
- Overrides:
getDatabaseTesterin classDatabaseTestCase- Throws:
Exception
-
setUpDatabaseConfig
- Overrides:
setUpDatabaseConfigin classDatabaseTestCase
-
tearDown
- Overrides:
tearDownin classDatabaseTestCase- Throws:
Exception
-
getConnection
- Specified by:
getConnectionin classDatabaseTestCase- Throws:
Exception
-
getDataSet
- Specified by:
getDataSetin classDatabaseTestCase- Throws:
Exception
-
closeConnection
- Overrides:
closeConnectionin classDatabaseTestCase- Throws:
Exception
-
runTest
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
- Throws:
Throwable
-
environmentHasFeature
-