public class JGivenExtension
extends java.lang.Object
implements org.junit.jupiter.api.extension.TestInstancePostProcessor, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
Just annotate your test class with @ExtendWith( JGivenExtension.class )
You can then inject stage classes by using the ScenarioStage
annotation
As an alternative you can also inherit from one of the following predefined base classes:
ScenarioTest
,
SimpleScenarioTest
Constructor and Description |
---|
JGivenExtension() |
Modifier and Type | Method and Description |
---|---|
void |
afterAll(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
afterEach(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) |
void |
postProcessTestInstance(java.lang.Object testInstance,
org.junit.jupiter.api.extension.ExtensionContext context) |
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
beforeAll
in interface org.junit.jupiter.api.extension.BeforeAllCallback
java.lang.Exception
public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
afterAll
in interface org.junit.jupiter.api.extension.AfterAllCallback
java.lang.Exception
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
beforeEach
in interface org.junit.jupiter.api.extension.BeforeEachCallback
java.lang.Exception
public void afterEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
afterEach
in interface org.junit.jupiter.api.extension.AfterEachCallback
java.lang.Exception
public void postProcessTestInstance(java.lang.Object testInstance, org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
postProcessTestInstance
in interface org.junit.jupiter.api.extension.TestInstancePostProcessor
java.lang.Exception