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

public class WeldJunit5AutoExtension extends WeldJunit5Extension
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.

See Also: