Class SetupExtension
- java.lang.Object
-
- io.patriot_framework.junit.extensions.SetupExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.Extension
,org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
- Direct Known Subclasses:
PatriotSetupExtension
public abstract class SetupExtension extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource
Abstract class represents base for extension to JUnit which allows configuration and Test environment setup before the Test Run is started.
-
-
Constructor Summary
Constructors Constructor Description SetupExtension()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
void
close()
protected abstract UUID
getUUID()
Abstract method to obtain unique identifier of the extensionprotected abstract boolean
isSetUp()
Abstract method to signal Extension framework that setup method already runabstract void
setUp()
This method is started once the implementation is instantiated by Test Runnerabstract void
tearDown()
This method is executed when Test Run is finished to clean environment
-
-
-
Method Detail
-
setUp
public abstract void setUp()
This method is started once the implementation is instantiated by Test Runner
-
tearDown
public abstract void tearDown()
This method is executed when Test Run is finished to clean environment
-
getUUID
protected abstract UUID getUUID()
Abstract method to obtain unique identifier of the extension- Returns:
- unique identifier
-
isSetUp
protected abstract boolean isSetUp()
Abstract method to signal Extension framework that setup method already run- Returns:
- true if setup method was invoked
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Exception
- Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
- Throws:
Exception
-
-