Class FlywayTestExtension

java.lang.Object
org.flywaydb.test.junit5.FlywayTestExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.AfterTestExecutionCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.BeforeTestExecutionCallback, org.junit.jupiter.api.extension.Extension

public class FlywayTestExtension extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeTestExecutionCallback, org.junit.jupiter.api.extension.AfterTestExecutionCallback
FlywayTest extension for JUnit5. The extension only work together with <a href="https://spring.io/"}>Spring Framework and need a implementation of SpringExtension. It support all features that are described with FlywayTest and FlywayTests. Usage:
 
 @ExtendWith(SpringExtension.class)
 @ExtendWith(FlywayTestExtension.class)
 class TestClass {

 }
 
 
Since:
5.2.2
Author:
florian
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    void
    afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    void
    afterTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    void
    beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    void
    beforeEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    void
    beforeTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlywayTestExtension

      public FlywayTestExtension()
  • Method Details

    • afterAll

      public void afterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception
      Specified by:
      afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
      Throws:
      Exception
    • afterEach

      public void afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception
      Specified by:
      afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
      Throws:
      Exception
    • afterTestExecution

      public void afterTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception
      Specified by:
      afterTestExecution in interface org.junit.jupiter.api.extension.AfterTestExecutionCallback
      Throws:
      Exception
    • beforeAll

      public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception
      Specified by:
      beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
      Throws:
      Exception
    • beforeEach

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

      public void beforeTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception
      Specified by:
      beforeTestExecution in interface org.junit.jupiter.api.extension.BeforeTestExecutionCallback
      Throws:
      Exception