Class BloviateExtension

java.lang.Object
io.bloviate.junit.BloviateExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension

public class BloviateExtension extends Object implements org.junit.jupiter.api.extension.BeforeEachCallback
JUnit Jupiter extension that fills a test database before each test, driven by FillDatabase. It is registered automatically via the @FillDatabase meta-annotation, so tests usually don't reference this class directly.

For each test it resolves the effective FillDatabase (method-level overrides class-level), locates the FillSource field, auto-detects the DatabaseSupport from the connection, and runs a DatabaseFiller with the annotation's row count, batch size, and seed.

See Also:
  • Constructor Details

    • BloviateExtension

      public BloviateExtension()
      Creates the extension; instantiated by JUnit via @ExtendWith.
  • Method Details

    • beforeEach

      public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
      Throws:
      Exception