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 discoveredAddBeanannotations.Get the discoveredAddConfigBlockannotations.Get the discoveredAddConfigannotations.Get the discoveredAddConfigSourcemethods.Get the discoveredAddExtensionannotations.booleanaddJaxRs()Get the discoveredAddJaxRsannotation.<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 discoveredConfigurationannotation.default booleancontainsAnnotation(Class<? extends Annotation> aType) Test if an annotation of the given type is found.default booleancontainsExtension(Class<? extends Extension> type) Test if the given extension is configured.booleanGet the value of the discoveredDisableDiscoveryannotation.element()Get the annotated element.default booleanGet the discovered value of@HelidonTest(pinningDetection = true).default longGet the discovered value of@HelidonTest(pinningThreshold = 50).default booleanGet 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:
resetPerTestvalue
-
pinningDetection
default boolean pinningDetection()Get the discovered value of@HelidonTest(pinningDetection = true).- Returns:
pinningDetectionvalue
-
pinningThreshold
default long pinningThreshold()Get the discovered value of@HelidonTest(pinningThreshold = 50).- Returns:
pinningThresholdvalue
-
addJaxRs
boolean addJaxRs()Get the discoveredAddJaxRsannotation.- Returns:
trueif the annotation is present
-
disableDiscovery
boolean disableDiscovery()Get the value of the discoveredDisableDiscoveryannotation.- Returns:
DisableDiscovery.value()orfalseif not found
-
addExtensions
List<AddExtension> addExtensions()Get the discoveredAddExtensionannotations.- Returns:
- annotations
-
addBeans
Get the discoveredAddBeanannotations.- Returns:
- annotations
-
configuration
Optional<Configuration> configuration()Get the discoveredConfigurationannotation.- Returns:
- annotation
-
addConfigs
Get the discoveredAddConfigannotations.- Returns:
- annotations
-
addConfigBlocks
List<AddConfigBlock> addConfigBlocks()Get the discoveredAddConfigBlockannotations.- Returns:
- annotations
-
addConfigSources
Get the discoveredAddConfigSourcemethods.- Returns:
- annotations
-
containsExtension
Test if the given extension is configured.- Parameters:
type- extension type- Returns:
trueif configured,falseotherwise
-
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:
trueif found
-