Package io.helidon.microprofile.testing
Annotation Interface DisableDiscovery
Disables CDI discovery.
If discovery is desired, do not annotate test class with this annotation.
If used on a method, the container will be reset regardless of the test lifecycle.
When disabling discovery, you are responsible for adding the beans and extensions needed to activate the features you need. You can use the following annotations to do that:
AddBean
to add CDI beansAddExtension
to add CDI extensionsAddJaxRs
a shorthand to add JAX-RS (Jersey)
See also the following "core" CDI extensions:
ServerCdiExtension
optional if usingAddJaxRs
JaxRsCdiExtension
optional if usingAddJaxRs
ConfigCdiExtension
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
By default, if you annotate a class or a method, discovery gets disabled.
-
Element Details
-
value
boolean valueBy default, if you annotate a class or a method, discovery gets disabled. If you want to override configuration on method to differ from class, you can configure the value tofalse
, effectively enabling discovery.- Returns:
- whether to disable discovery (
true
), or enable it (false
). If this annotation is not present, discovery is enabled
- Default:
true
-