-
-
Notifications
You must be signed in to change notification settings - Fork 3
ForgeExtension
class ForgeExtension : BeforeAllCallback, BeforeEachCallback, BeforeTestExecutionCallback, TestExecutionExceptionHandler, ParameterResolver, Listener
A JUnit Jupiter extension that can inject forgeries in the test class's fields/properties/method parameters (when annotated with Forgery). It can also inject a Forge instance in test methods without the need to annotate it.
See Also
ForgeExtension()
A JUnit Jupiter extension that can inject forgeries in the test class's fields/properties/method parameters (when annotated with Forgery). It can also inject a Forge instance in test methods without the need to annotate it.
See Also
fun beforeAll(context: ExtensionContext):
Unit
Inheritdoc
fun beforeEach(context: ExtensionContext):
Unit
Inheritdoc
fun beforeTestExecution(context: ExtensionContext):
Unit
Inheritdoc
fun handleTestExecutionException(context: ExtensionContext, throwable:
Throwable
):
Unit
Inheritdoc
fun onFieldInjected(declaringClass:
Class
<*>, fieldType:
Type
, fieldName:
String
, value:
Any
?):
Unit
Inheritdoc
fun resolveParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext):
Any
?
Inheritdoc
fun supportsParameter(parameterContext: ParameterContext, extensionContext: ExtensionContext):
Boolean
Inheritdoc
@JvmStatic fun getForge(context: ExtensionContext): Forge?
Retrieves the Forge stored in the given ExtensionContext global store.
context
- the current ExtensionContext.
Return the valid forge for that context or null
val EXTENSION_STORE_FORGE_KEY:
String
The key used to store the Forge in an ExtensionContext's global store.
Xavier F. Gouchet – @xgouchet
Distributed under the MIT license. See LICENSE.md for more information.
https://github.com/xgouchet/Elymr
- Home
- Getting Started
- Core Module
- Integrations
- Reference (core)
- Reference (junit4)
- Reference (junit5)
- Reference (spek)