Package io.helidon.microprofile.testing
Interface HelidonTestDescriptor<T extends AnnotatedElement>
- Type Parameters:
T
- element type
- All Known Subinterfaces:
HelidonTestInfo<T>
- All Known Implementing Classes:
HelidonTestDescriptorBase
,HelidonTestInfo.ClassInfo
,HelidonTestInfo.MethodInfo
public interface HelidonTestDescriptor<T extends AnnotatedElement>
Describes annotations for a test class or method.
-
Method Summary
Modifier and TypeMethodDescriptionaddBeans()
Get the discoveredAddBean
annotations.Get the discoveredAddConfigBlock
annotations.Get the discoveredAddConfig
annotations.Get the discoveredAddConfigSource
methods.Get the discoveredAddExtension
annotations.boolean
addJaxRs()
Get the discoveredAddJaxRs
annotation.<A extends Annotation>
Stream<A> annotations
(Class<A> aType) Get annotations.<A extends Annotation,
C extends Annotation>
Stream<A> annotations
(Class<A> aType, Class<C> cType, Function<C, A[]> function) Get annotations.Get the discoveredConfiguration
annotation.default boolean
containsAnnotation
(Class<? extends Annotation> aType) Test if an annotation of the given type is found.default boolean
containsExtension
(Class<? extends Extension> type) Test if the given extension is configured.boolean
Get the value of the discoveredDisableDiscovery
annotation.element()
Get the annotated element.default boolean
Get the discovered value of@HelidonTest(pinningDetection = true)
.default long
Get the discovered value of@HelidonTest(pinningThreshold = 50)
.default boolean
Get the discovered value of@HelidonTest(resetPerTest = true)
.
-
Method Details
-
element
T element()Get the annotated element.- Returns:
- element
-
resetPerTest
default boolean resetPerTest()Get the discovered value of@HelidonTest(resetPerTest = true)
.- Returns:
resetPerTest
value
-
pinningDetection
default boolean pinningDetection()Get the discovered value of@HelidonTest(pinningDetection = true)
.- Returns:
pinningDetection
value
-
pinningThreshold
default long pinningThreshold()Get the discovered value of@HelidonTest(pinningThreshold = 50)
.- Returns:
pinningThreshold
value
-
addJaxRs
boolean addJaxRs()Get the discoveredAddJaxRs
annotation.- Returns:
true
if the annotation is present
-
disableDiscovery
boolean disableDiscovery()Get the value of the discoveredDisableDiscovery
annotation.- Returns:
DisableDiscovery.value()
orfalse
if not found
-
addExtensions
List<AddExtension> addExtensions()Get the discoveredAddExtension
annotations.- Returns:
- annotations
-
addBeans
Get the discoveredAddBean
annotations.- Returns:
- annotations
-
configuration
Optional<Configuration> configuration()Get the discoveredConfiguration
annotation.- Returns:
- annotation
-
addConfigs
Get the discoveredAddConfig
annotations.- Returns:
- annotations
-
addConfigBlocks
List<AddConfigBlock> addConfigBlocks()Get the discoveredAddConfigBlock
annotations.- Returns:
- annotations
-
addConfigSources
Get the discoveredAddConfigSource
methods.- Returns:
- annotations
-
containsExtension
Test if the given extension is configured.- Parameters:
type
- extension type- Returns:
true
if configured,false
otherwise
-
annotations
<A extends Annotation,C extends Annotation> Stream<A> annotations(Class<A> aType, Class<C> cType, Function<C, A[]> function) Get annotations.- Type Parameters:
A
- annotation typeC
- container type- Parameters:
aType
- annotation typecType
- annotation container typefunction
- function to inflate from container- Returns:
- annotations
-
annotations
Get annotations.- Type Parameters:
A
- annotation type- Parameters:
aType
- annotation type- Returns:
- annotations
-
containsAnnotation
Test if an annotation of the given type is found.- Parameters:
aType
- annotation type- Returns:
true
if found
-