Class ParameterExtractorService
- java.lang.Object
-
- io.testomat.junit.extractor.strategy.ParameterExtractorService
-
public class ParameterExtractorService extends java.lang.ObjectService that orchestrates parameter extraction from parameterized tests using direct annotation mapping. Automatically selects the appropriate handler based on test method annotations.
-
-
Constructor Summary
Constructors Constructor Description ParameterExtractorService()ParameterExtractorService(ParameterHandlerRegistry handlerRegistry)Constructor for testing with custom handler registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectextractParameters(org.junit.jupiter.api.extension.ExtensionContext extensionContext)Extracts parameters from a parameterized test using the appropriate strategy.ParameterHandlerRegistrygetHandlerRegistry()Gets the handler registry for testing purposes.
-
-
-
Constructor Detail
-
ParameterExtractorService
public ParameterExtractorService()
-
ParameterExtractorService
public ParameterExtractorService(ParameterHandlerRegistry handlerRegistry)
Constructor for testing with custom handler registry.- Parameters:
handlerRegistry- the custom handler registry
-
-
Method Detail
-
extractParameters
public java.lang.Object extractParameters(org.junit.jupiter.api.extension.ExtensionContext extensionContext)
Extracts parameters from a parameterized test using the appropriate strategy.- Parameters:
extensionContext- the JUnit extension context- Returns:
- extracted parameter object (single value or Map), or null if extraction fails
-
getHandlerRegistry
public ParameterHandlerRegistry getHandlerRegistry()
Gets the handler registry for testing purposes.- Returns:
- the handler registry instance
-
-