Package org.dbunit.database.rowcount
Class ClearRowCountCheckSystemPropertiesExtension
java.lang.Object
org.dbunit.database.rowcount.ClearRowCountCheckSystemPropertiesExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterEachCallback,org.junit.jupiter.api.extension.BeforeEachCallback,org.junit.jupiter.api.extension.Extension
public class ClearRowCountCheckSystemPropertiesExtension
extends Object
implements org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
Clears the
dbunit.rowCountCheck and dbunit.rowCountCheckExcludeTables
system properties before each test and restores whatever they were afterward. See
ClearRowCountCheckSystemProperties.- Since:
- 3.6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterEach(org.junit.jupiter.api.extension.ExtensionContext context) Restores both system properties to the valuesbeforeEach(ExtensionContext)saved.voidbeforeEach(org.junit.jupiter.api.extension.ExtensionContext context) Saves the current values of both system properties, then clears them.
-
Constructor Details
-
ClearRowCountCheckSystemPropertiesExtension
public ClearRowCountCheckSystemPropertiesExtension()
-
-
Method Details
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) Saves the current values of both system properties, then clears them.- Specified by:
beforeEachin interfaceorg.junit.jupiter.api.extension.BeforeEachCallback- Parameters:
context- the extension context for the test about to run.
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) Restores both system properties to the valuesbeforeEach(ExtensionContext)saved.- Specified by:
afterEachin interfaceorg.junit.jupiter.api.extension.AfterEachCallback- Parameters:
context- the extension context for the test that just ran.
-