Package org.jboss.weld.junit5.auto
Class WeldJunit5AutoExtension
java.lang.Object
org.jboss.weld.junit5.WeldJunit5Extension
org.jboss.weld.junit5.auto.WeldJunit5AutoExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback,org.junit.jupiter.api.extension.AfterEachCallback,org.junit.jupiter.api.extension.BeforeAllCallback,org.junit.jupiter.api.extension.BeforeEachCallback,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.ParameterResolver,org.junit.jupiter.api.extension.TestInstantiationAwareExtension
An alternative to
WeldJunit5Extension allowing to fully leverage an annotation based configuration approach.
When used, the extension will attempt to resolve all beans used in your test class and automatically adds them to
the Weld container while bootstrapping it.
There are quite some annotations which can be used to configure it further.
Furthermore, all discovered WeldJunitEnrichers are invoked after the annotations are processed.
Note that this approach cannot be combined with WeldJunit5Extension, choose one or the other approach, not both.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension
org.junit.jupiter.api.extension.TestInstantiationAwareExtension.ExtensionContextScope -
Field Summary
Fields inherited from class org.jboss.weld.junit5.WeldJunit5Extension
GLOBAL_EXPLICIT_PARAM_INJECTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvalidateInitiator(List<Field> foundInitiatorFields) protected voidweldInit(org.junit.jupiter.api.extension.ExtensionContext context, Weld weld, WeldInitiator.Builder weldInitiatorBuilder) Methods inherited from class org.jboss.weld.junit5.WeldJunit5Extension
afterAll, afterEach, beforeAll, beforeEach, resolveParameter, supportsParameterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.api.extension.TestInstantiationAwareExtension
getTestInstantiationExtensionContextScope
-
Constructor Details
-
WeldJunit5AutoExtension
public WeldJunit5AutoExtension()
-
-
Method Details
-
validateInitiator
- Overrides:
validateInitiatorin classWeldJunit5Extension
-
weldInit
protected void weldInit(org.junit.jupiter.api.extension.ExtensionContext context, Weld weld, WeldInitiator.Builder weldInitiatorBuilder) - Overrides:
weldInitin classWeldJunit5Extension
-