Package io.helidon.microprofile.testing
Annotation Interface AddBean
@Inherited
@Retention(RUNTIME)
@Target({TYPE,METHOD})
@Repeatable(AddBeans.class)
public @interface AddBean
Add a CDI bean to the container.
This annotation can be repeated.
If used on a method, the container will be reset regardless of the test lifecycle.
The bean scope is defined as follows:
- If a scope is set with
value()
, it overrides any scope defined on the bean - Otherwise, the scope defined on the bean is used
- If the bean does not define a scope,
ApplicationScoped
is used
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
value
Class<?> valueThe bean class.- Returns:
- bean class
-
scope
Class<? extends Annotation> scopeOverride the bean scope.- Returns:
- scope class
- Default:
java.lang.annotation.Annotation.class
-