Package io.quarkus.test.component
Annotation Interface QuarkusComponentTest
@Experimental("This feature is experimental and the API may change in the future")
@ExtendWith(QuarkusComponentTestExtension.class)
@Retention(RUNTIME)
@Target(TYPE)
public @interface QuarkusComponentTest
Registers the
QuarkusComponentTestExtension that makes it easy to test Quarkus components.- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIf set totruethen all static nested classes are considered additional components under test.Class<? extends AnnotationsTransformer>[]The additional annotation transformers.intThe ordinal of the config source used for all test config properties.booleanIndicates that the default values should be used for missing config properties.Class<?>[]The set of additional components under test.
-
Element Details
-
value
Class<?>[] valueThe set of additional components under test.The initial set of components is derived from the test class. The types of all fields annotated with
Injectare considered the component types. Furthermore, all types of parameters of test methods that are not annotated withInjectMockorSkipInjectare also considered the component types.- Returns:
- the components under test
- Default:
- {}
-
useDefaultConfigProperties
boolean useDefaultConfigPropertiesIndicates that the default values should be used for missing config properties.If not used then a missing config property results in a test failure.
For primitives the default values as defined in the JLS are used. For any other type
nullis injected.- Default:
- false
-
addNestedClassesAsComponents
boolean addNestedClassesAsComponentsIf set totruethen all static nested classes are considered additional components under test.- See Also:
- Default:
- true
-
configSourceOrdinal
int configSourceOrdinalThe ordinal of the config source used for all test config properties.- Default:
- 500
-
annotationsTransformers
Class<? extends AnnotationsTransformer>[] annotationsTransformersThe additional annotation transformers.The initial set includes the
JaxrsSingletonTransformer.- See Also:
- Default:
- {}
-