Class EnumSourceHandler
- java.lang.Object
-
- io.testomat.junit.extractor.strategy.handlers.AbstractParameterExtractionHandler
-
- io.testomat.junit.extractor.strategy.handlers.EnumSourceHandler
-
- All Implemented Interfaces:
ParameterExtractionHandler
public class EnumSourceHandler extends AbstractParameterExtractionHandler
Parameter extraction handler for @EnumSource annotated parameterized tests. Supports extraction of enum values from @EnumSource annotations with various configurations including names filtering, mode selection, and enum constant parsing.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.testomat.junit.extractor.strategy.handlers.AbstractParameterExtractionHandler
AbstractParameterExtractionHandler.ParseResult
-
-
Field Summary
-
Fields inherited from class io.testomat.junit.extractor.strategy.handlers.AbstractParameterExtractionHandler
logger
-
-
Constructor Summary
Constructors Constructor Description EnumSourceHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectextractFromAnnotation(ParameterExtractionContext context)Extracts parameter values from the annotation as a fallback.java.lang.StringgetStrategyName()Gets the name of this strategy for debugging and logging purposes.protected java.lang.ObjectparseDisplayNameValue(java.lang.String valueStr, ParameterExtractionContext context)Parses the value from the display name specific to this handler type.-
Methods inherited from class io.testomat.junit.extractor.strategy.handlers.AbstractParameterExtractionHandler
createGenericParameterMap, createMultiParameterMap, createSingleParameterMap, extractFromDisplayNameWithResult, extractParameters, formatParameters, parseTypedValue, removeQuotes
-
-
-
-
Method Detail
-
getStrategyName
public java.lang.String getStrategyName()
Description copied from interface:ParameterExtractionHandlerGets the name of this strategy for debugging and logging purposes.- Returns:
- human-readable strategy name
-
parseDisplayNameValue
protected java.lang.Object parseDisplayNameValue(java.lang.String valueStr, ParameterExtractionContext context)Description copied from class:AbstractParameterExtractionHandlerParses the value from the display name specific to this handler type.- Specified by:
parseDisplayNameValuein classAbstractParameterExtractionHandler- Parameters:
valueStr- the value string from the display namecontext- the parameter extraction context- Returns:
- the parsed values
-
extractFromAnnotation
protected java.lang.Object extractFromAnnotation(ParameterExtractionContext context)
Description copied from class:AbstractParameterExtractionHandlerExtracts parameter values from the annotation as a fallback.- Specified by:
extractFromAnnotationin classAbstractParameterExtractionHandler- Parameters:
context- the parameter extraction context- Returns:
- the extracted values from the annotation
-
-