Support nullable Java Date/Time arguments in @ParameterizedTest
methods
#4010
Labels
Milestone
@ParameterizedTest
methods
#4010
When supplying a Java Time parameter in parameterized tests, it is not possible to null the parameter by supplying a null-String:
junit5/junit-jupiter-params/src/main/java/org/junit/jupiter/params/converter/JavaTimeArgumentConverter.java
Lines 52 to 56 in 6be5547
In my tests, it would come in handy if I could just set a null string in my
CsvSource
and have theJavaTimeArgumentConverter
null the Java Time parameter.I would suggest making this behaviour configurable via the
JavaTimeConversionPattern
annotation, such as:(with the old behaviour being the default).
Let me know what you think. If you deem this feature useful, I'd be happy to provide a PR for this.
Deliverables
JavaTimeArgumentConverter
convert null-valuesThe text was updated successfully, but these errors were encountered: