Module org.junit.jupiter.params
Class JavaTimeArgumentConverter
java.lang.Object
org.junit.jupiter.params.converter.SimpleArgumentConverter
org.junit.jupiter.params.converter.JavaTimeArgumentConverter
- All Implemented Interfaces:
Consumer<JavaTimeConversionPattern>
,ArgumentConverter
,AnnotationConsumer<JavaTimeConversionPattern>
class JavaTimeArgumentConverter
extends SimpleArgumentConverter
implements AnnotationConsumer<JavaTimeConversionPattern>
- Since:
- 5.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private static final Map<Class<?>,
TemporalQuery<?>> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.junit.jupiter.params.converter.SimpleArgumentConverter
convert
-
Field Details
-
TEMPORAL_QUERIES
-
pattern
-
-
Constructor Details
-
JavaTimeArgumentConverter
JavaTimeArgumentConverter()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<JavaTimeConversionPattern>
-
convert
Description copied from class:SimpleArgumentConverter
Convert the suppliedsource
object into the suppliedtargetType
.- Specified by:
convert
in classSimpleArgumentConverter
- Parameters:
input
- the source object to convert; may benull
targetClass
- the target type the source object should be converted into; nevernull
- Returns:
- the converted object; may be
null
but only if the target type is a reference type - Throws:
ArgumentConversionException
- in case an error occurs during the conversion
-