Package io.quarkus.test.component
Annotation Type QuarkusComponentTest
-
@Experimental("This feature is experimental and the API may change in the future") @ExtendWith(QuarkusComponentTestExtension.class) @Retention(RUNTIME) @Target(TYPE) public @interface QuarkusComponentTestRegisters theQuarkusComponentTestExtensionthat makes it easy to test Quarkus components.- See Also:
InjectMock,TestConfigProperty
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanaddNestedClassesAsComponentsIf set totruethen all static nested classes are considered additional components under test.Class<? extends AnnotationsTransformer>[]annotationsTransformersThe additional annotation transformers.intconfigSourceOrdinalThe ordinal of the config source used for all test config properties.booleanuseDefaultConfigPropertiesIndicates that the default values should be used for missing config properties.Class<?>[]valueThe set of additional components under test.
-
-
-
Element Detail
-
value
Class<?>[] value
The 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.- Returns:
- the components under test
- Default:
- {}
-
-
-
useDefaultConfigProperties
boolean useDefaultConfigProperties
Indicates 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 addNestedClassesAsComponents
If set totruethen all static nested classes are considered additional components under test.- See Also:
value()
- Default:
- true
-
-
-
annotationsTransformers
Class<? extends AnnotationsTransformer>[] annotationsTransformers
The additional annotation transformers.The initial set includes the
JaxrsSingletonTransformer.- See Also:
AnnotationsTransformer,QuarkusComponentTestExtensionBuilder.addAnnotationsTransformer(AnnotationsTransformer)
- Default:
- {}
-
-