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 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:
      beforeEach in interface org.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 values beforeEach(ExtensionContext) saved.
      Specified by:
      afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
      Parameters:
      context - the extension context for the test that just ran.