Package org.flywaydb.test.junit5
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) voidafterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) voidafterTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext) voidbeforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) voidbeforeEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) voidbeforeTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
-
Constructor Details
-
FlywayTestExtension
public FlywayTestExtension()
-
-
Method Details
-
afterAll
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception - Specified by:
afterAllin interfaceorg.junit.jupiter.api.extension.AfterAllCallback- Throws:
Exception
-
afterEach
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception - Specified by:
afterEachin interfaceorg.junit.jupiter.api.extension.AfterEachCallback- Throws:
Exception
-
afterTestExecution
public void afterTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception - Specified by:
afterTestExecutionin interfaceorg.junit.jupiter.api.extension.AfterTestExecutionCallback- Throws:
Exception
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception - Specified by:
beforeAllin interfaceorg.junit.jupiter.api.extension.BeforeAllCallback- Throws:
Exception
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception - Specified by:
beforeEachin interfaceorg.junit.jupiter.api.extension.BeforeEachCallback- Throws:
Exception
-
beforeTestExecution
public void beforeTestExecution(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception - Specified by:
beforeTestExecutionin interfaceorg.junit.jupiter.api.extension.BeforeTestExecutionCallback- Throws:
Exception
-