Class ArgumentsSourceHandler
- java.lang.Object
-
- io.testomat.junit.extractor.strategy.handlers.AbstractParameterExtractionHandler
-
- io.testomat.junit.extractor.strategy.handlers.ArgumentsSourceHandler
-
- All Implemented Interfaces:
ParameterExtractionHandler
public class ArgumentsSourceHandler extends AbstractParameterExtractionHandler
Parameter extraction handler for @ArgumentsSource annotated parameterized tests. Supports extraction of parameter values from custom ArgumentsProvider implementations specified in @ArgumentsSource annotations. Handles complex argument providers with automatic instantiation and invocation.
-
-
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 ArgumentsSourceHandler()
-
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.protected java.lang.ObjectparseTypedValue(java.lang.String value)Parses a string value into its appropriate type with common type conversions.-
Methods inherited from class io.testomat.junit.extractor.strategy.handlers.AbstractParameterExtractionHandler
createGenericParameterMap, createMultiParameterMap, createSingleParameterMap, extractFromDisplayNameWithResult, extractParameters, formatParameters, 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
-
parseTypedValue
protected java.lang.Object parseTypedValue(java.lang.String value)
Description copied from class:AbstractParameterExtractionHandlerParses a string value into its appropriate type with common type conversions.- Overrides:
parseTypedValuein classAbstractParameterExtractionHandler- Parameters:
value- the string value to parse- Returns:
- the parsed typed value (Boolean, Integer, Long, Double, or String)
-
-