Package net.officefloor.test.skip
Class SkipExtension
- java.lang.Object
-
- net.officefloor.test.skip.SkipExtension
-
- All Implemented Interfaces:
org.junit.jupiter.api.extension.BeforeAllCallback
,org.junit.jupiter.api.extension.BeforeEachCallback
,org.junit.jupiter.api.extension.Extension
public class SkipExtension extends java.lang.Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback
Extension
to skip test under particular conditions.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SkipExtension.SkipCondition
Condition for skipping.
-
Constructor Summary
Constructors Constructor Description SkipExtension(boolean isSkip)
Instantiate.SkipExtension(boolean isSkip, java.lang.String message)
Instantiate.SkipExtension(SkipExtension.SkipCondition condition)
Instantiate withSkipExtension.SkipCondition
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeAll(org.junit.jupiter.api.extension.ExtensionContext context)
void
beforeEach(org.junit.jupiter.api.extension.ExtensionContext context)
-
-
-
Constructor Detail
-
SkipExtension
public SkipExtension(SkipExtension.SkipCondition condition)
Instantiate withSkipExtension.SkipCondition
.- Parameters:
condition
-SkipExtension.SkipCondition
.
-
SkipExtension
public SkipExtension(boolean isSkip)
Instantiate.- Parameters:
isSkip
- Indicates whether to skip.
-
SkipExtension
public SkipExtension(boolean isSkip, java.lang.String message)
Instantiate.- Parameters:
isSkip
- Indicates whether to skip.message
- Skip message.
-
-
Method Detail
-
beforeAll
public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
beforeAll
in interfaceorg.junit.jupiter.api.extension.BeforeAllCallback
- Throws:
java.lang.Exception
-
beforeEach
public void beforeEach(org.junit.jupiter.api.extension.ExtensionContext context) throws java.lang.Exception
- Specified by:
beforeEach
in interfaceorg.junit.jupiter.api.extension.BeforeEachCallback
- Throws:
java.lang.Exception
-
-