Package io.helidon.microprofile.testing
Interface HelidonTestInfo<T extends AnnotatedElement>
- Type Parameters:
T
- element type
- All Superinterfaces:
HelidonTestDescriptor<T>
- All Known Implementing Classes:
HelidonTestInfo.ClassInfo
,HelidonTestInfo.MethodInfo
public sealed interface HelidonTestInfo<T extends AnnotatedElement>
extends HelidonTestDescriptor<T>
permits HelidonTestInfo.ClassInfo, HelidonTestInfo.MethodInfo
Metadata of the test class or method that triggers the creation of a CDI container.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Class info.static final class
Method info. -
Method Summary
Modifier and TypeMethodDescriptionGet the class info.static HelidonTestInfo.ClassInfo
classInfo
(HelidonTestDescriptor<Class<?>> desc) Create a new class info.static HelidonTestInfo.ClassInfo
Create a new class info.static HelidonTestInfo.ClassInfo
Create a new class info.id()
Get the id.static HelidonTestInfo.MethodInfo
methodInfo
(HelidonTestDescriptor<Method> desc, HelidonTestInfo.ClassInfo classInfo) Create a new method info.static HelidonTestInfo.MethodInfo
methodInfo
(Method element, HelidonTestInfo.ClassInfo classInfo) Create a new method info.static HelidonTestInfo.MethodInfo
methodInfo
(Method method, HelidonTestInfo.ClassInfo classInfo, Function<Method, HelidonTestDescriptor<Method>> function) Create a new method info.default boolean
Indicate if the container should be reset.Class
<?> Get the test class.Get the test method.Methods inherited from interface io.helidon.microprofile.testing.HelidonTestDescriptor
addBeans, addConfigBlocks, addConfigs, addConfigSources, addExtensions, addJaxRs, annotations, annotations, configuration, containsAnnotation, containsExtension, disableDiscovery, element, pinningDetection, pinningThreshold, resetPerTest
-
Method Details
-
classInfo
Create a new class info.- Parameters:
cls
- class- Returns:
- ClassInfo
-
classInfo
static HelidonTestInfo.ClassInfo classInfo(Class<?> cls, Function<Class<?>, HelidonTestDescriptor<Class<?>>> function) Create a new class info.- Parameters:
cls
- classfunction
- descriptor factory- Returns:
- ClassInfo
-
classInfo
Create a new class info.- Parameters:
desc
- class descriptor- Returns:
- ClassInfo
-
methodInfo
Create a new method info.- Parameters:
element
- methodclassInfo
- class info- Returns:
- MethodInfo
-
methodInfo
static HelidonTestInfo.MethodInfo methodInfo(Method method, HelidonTestInfo.ClassInfo classInfo, Function<Method, HelidonTestDescriptor<Method>> function) Create a new method info.- Parameters:
method
- methodclassInfo
- class infofunction
- descriptor factory- Returns:
- MethodInfo
-
methodInfo
static HelidonTestInfo.MethodInfo methodInfo(HelidonTestDescriptor<Method> desc, HelidonTestInfo.ClassInfo classInfo) Create a new method info.- Parameters:
desc
- method descriptorclassInfo
- class info- Returns:
- MethodInfo
-
id
String id()Get the id.- Returns:
- id
-
testClass
Class<?> testClass()Get the test class.- Returns:
- test class
-
testMethod
Get the test method.- Returns:
- test method
-
classInfo
HelidonTestInfo.ClassInfo classInfo()Get the class info.- Returns:
- ClassInfo
-
requiresReset
default boolean requiresReset()Indicate if the container should be reset. For a class this is resolved viaHelidonTest#resetPerTest()
. For a method this is inferred if any of the following annotations is used:- Returns:
true
if reset is required,false
otherwise
-