Created
July 14, 2022 22:20
Revisions
-
beyondxscratch created this gist
Jul 14, 2022 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ @ParameterizedTest @ValueSource(strings = {"JANUARY", "FEBRUARY", "MARCH"}) void a_test_with_explicit_conversion( @ConvertWith(MonthToNumberConverter.class) int month) { assertTrue(month <= 3); } class MonthToNumberConverter extends SimpleArgumentConverter { @Override protected Object convert(Object source, Class<?> targetType) { Month month = Month.valueOf((String) source); return month.getValue(); } }