Rename params helper method
This commit is contained in:
parent
b5b43836eb
commit
ad49c9aecd
|
@ -19,6 +19,10 @@ public class VersionConvertorPrimitiveTypeTests {
|
|||
"dGhpcyBpcyB2YWxpZCBiYXNlNjQ="
|
||||
};
|
||||
|
||||
private static String[] BOOLEAN_STRINGS = {
|
||||
"true", "false"
|
||||
};
|
||||
|
||||
private static String[] DEFAULT_DATE_PRECISION_STRINGS = {
|
||||
"1933", "1933-01", "1933-01-02"
|
||||
};
|
||||
|
@ -35,7 +39,7 @@ public class VersionConvertorPrimitiveTypeTests {
|
|||
"1933-01-02T13:45:12", "1933-01-02T13:45:12.3", "1933-01-02T13:45:12.3456"
|
||||
};
|
||||
|
||||
private static <K,L> Stream<Arguments> getDateTimeArgs(Class<? extends VersionConvertorFactory> versionConverterFactoryClazz, Class<K> firstTypeClazz, Class<?> firstTypeMethodClazz, Class<L> secondTypeClazz, Class<?> secondTypeMethodClazz, String[] testStrings) {
|
||||
private static <K,L> Stream<Arguments> getConversionParams(Class<? extends VersionConvertorFactory> versionConverterFactoryClazz, Class<K> firstTypeClazz, Class<?> firstTypeMethodClazz, Class<L> secondTypeClazz, Class<?> secondTypeMethodClazz, String[] testStrings) {
|
||||
|
||||
return Arrays.stream(testStrings).map( it -> Arguments.of(versionConverterFactoryClazz,
|
||||
firstTypeClazz, firstTypeMethodClazz, it,
|
||||
|
@ -46,179 +50,179 @@ public class VersionConvertorPrimitiveTypeTests {
|
|||
private static Stream<Arguments> getParams() {
|
||||
return Stream.of(
|
||||
//Base64Binary
|
||||
getDateTimeArgs(VersionConvertorFactory_10_30.class,
|
||||
getConversionParams(VersionConvertorFactory_10_30.class,
|
||||
org.hl7.fhir.dstu2.model.Base64BinaryType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.Base64BinaryType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_40.class,
|
||||
getConversionParams(VersionConvertorFactory_10_40.class,
|
||||
org.hl7.fhir.dstu2.model.Base64BinaryType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r4.model.Base64BinaryType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_50.class,
|
||||
getConversionParams(VersionConvertorFactory_10_50.class,
|
||||
org.hl7.fhir.dstu2.model.Base64BinaryType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r5.model.Base64BinaryType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_30.class,
|
||||
getConversionParams(VersionConvertorFactory_14_30.class,
|
||||
org.hl7.fhir.dstu2016may.model.Base64BinaryType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.Base64BinaryType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_40.class,
|
||||
getConversionParams(VersionConvertorFactory_14_40.class,
|
||||
org.hl7.fhir.dstu2016may.model.Base64BinaryType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r4.model.Base64BinaryType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_50.class,
|
||||
getConversionParams(VersionConvertorFactory_14_50.class,
|
||||
org.hl7.fhir.dstu2016may.model.Base64BinaryType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r5.model.Base64BinaryType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_40.class,
|
||||
getConversionParams(VersionConvertorFactory_30_40.class,
|
||||
org.hl7.fhir.dstu3.model.Base64BinaryType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r4.model.Base64BinaryType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_50.class,
|
||||
getConversionParams(VersionConvertorFactory_30_50.class,
|
||||
org.hl7.fhir.dstu3.model.Base64BinaryType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r5.model.Base64BinaryType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_40_50.class,
|
||||
getConversionParams(VersionConvertorFactory_40_50.class,
|
||||
org.hl7.fhir.r4.model.Base64BinaryType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
org.hl7.fhir.r5.model.Base64BinaryType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
BASE64_BINARY_STRINGS),
|
||||
|
||||
//Date
|
||||
getDateTimeArgs(VersionConvertorFactory_10_30.class,
|
||||
getConversionParams(VersionConvertorFactory_10_30.class,
|
||||
org.hl7.fhir.dstu2.model.DateType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.DateType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_40.class,
|
||||
getConversionParams(VersionConvertorFactory_10_40.class,
|
||||
org.hl7.fhir.dstu2.model.DateType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_50.class,
|
||||
getConversionParams(VersionConvertorFactory_10_50.class,
|
||||
org.hl7.fhir.dstu2.model.DateType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_30.class,
|
||||
getConversionParams(VersionConvertorFactory_14_30.class,
|
||||
org.hl7.fhir.dstu2016may.model.DateType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.DateType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_40.class,
|
||||
getConversionParams(VersionConvertorFactory_14_40.class,
|
||||
org.hl7.fhir.dstu2016may.model.DateType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_50.class,
|
||||
getConversionParams(VersionConvertorFactory_14_50.class,
|
||||
org.hl7.fhir.dstu2016may.model.DateType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_40.class,
|
||||
getConversionParams(VersionConvertorFactory_30_40.class,
|
||||
org.hl7.fhir.dstu3.model.DateType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_50.class,
|
||||
getConversionParams(VersionConvertorFactory_30_50.class,
|
||||
org.hl7.fhir.dstu3.model.DateType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_40_50.class,
|
||||
getConversionParams(VersionConvertorFactory_40_50.class,
|
||||
org.hl7.fhir.r4.model.DateType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
|
||||
//Date DateTime
|
||||
getDateTimeArgs(VersionConvertorFactory_10_30.class,
|
||||
getConversionParams(VersionConvertorFactory_10_30.class,
|
||||
org.hl7.fhir.dstu2.model.DateType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.DateTimeType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_40.class,
|
||||
getConversionParams(VersionConvertorFactory_10_40.class,
|
||||
org.hl7.fhir.dstu2.model.DateType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateTimeType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_50.class,
|
||||
getConversionParams(VersionConvertorFactory_10_50.class,
|
||||
org.hl7.fhir.dstu2.model.DateType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateTimeType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_30.class,
|
||||
getConversionParams(VersionConvertorFactory_10_30.class,
|
||||
org.hl7.fhir.dstu2.model.DateTimeType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.DateType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_40.class,
|
||||
getConversionParams(VersionConvertorFactory_10_40.class,
|
||||
org.hl7.fhir.dstu2.model.DateTimeType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_50.class,
|
||||
getConversionParams(VersionConvertorFactory_10_50.class,
|
||||
org.hl7.fhir.dstu2.model.DateTimeType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
DEFAULT_DATE_PRECISION_STRINGS),
|
||||
|
||||
//DateTime
|
||||
getDateTimeArgs(VersionConvertorFactory_10_30.class,
|
||||
getConversionParams(VersionConvertorFactory_10_30.class,
|
||||
org.hl7.fhir.dstu2.model.DateTimeType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.DateTimeType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_40.class,
|
||||
getConversionParams(VersionConvertorFactory_10_40.class,
|
||||
org.hl7.fhir.dstu2.model.DateTimeType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateTimeType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_50.class,
|
||||
getConversionParams(VersionConvertorFactory_10_50.class,
|
||||
org.hl7.fhir.dstu2.model.DateTimeType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateTimeType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_30.class,
|
||||
getConversionParams(VersionConvertorFactory_14_30.class,
|
||||
org.hl7.fhir.dstu2016may.model.DateTimeType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.DateTimeType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_40.class,
|
||||
getConversionParams(VersionConvertorFactory_14_40.class,
|
||||
org.hl7.fhir.dstu2016may.model.DateTimeType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateTimeType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_50.class,
|
||||
getConversionParams(VersionConvertorFactory_14_50.class,
|
||||
org.hl7.fhir.dstu2016may.model.DateTimeType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateTimeType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_40.class,
|
||||
getConversionParams(VersionConvertorFactory_30_40.class,
|
||||
org.hl7.fhir.dstu3.model.DateTimeType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r4.model.DateTimeType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_50.class,
|
||||
getConversionParams(VersionConvertorFactory_30_50.class,
|
||||
org.hl7.fhir.dstu3.model.DateTimeType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateTimeType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_40_50.class,
|
||||
getConversionParams(VersionConvertorFactory_40_50.class,
|
||||
org.hl7.fhir.r4.model.DateTimeType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
org.hl7.fhir.r5.model.DateTimeType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
MILLISECOND_DATE_PRECISION_STRINGS),
|
||||
|
||||
//Instant
|
||||
getDateTimeArgs(VersionConvertorFactory_10_30.class,
|
||||
getConversionParams(VersionConvertorFactory_10_30.class,
|
||||
org.hl7.fhir.dstu2.model.InstantType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.InstantType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_40.class,
|
||||
getConversionParams(VersionConvertorFactory_10_40.class,
|
||||
org.hl7.fhir.dstu2.model.InstantType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r4.model.InstantType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_10_50.class,
|
||||
getConversionParams(VersionConvertorFactory_10_50.class,
|
||||
org.hl7.fhir.dstu2.model.InstantType.class, org.hl7.fhir.dstu2.model.Type.class,
|
||||
org.hl7.fhir.r5.model.InstantType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_30.class,
|
||||
getConversionParams(VersionConvertorFactory_14_30.class,
|
||||
org.hl7.fhir.dstu2016may.model.InstantType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.dstu3.model.InstantType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_40.class,
|
||||
getConversionParams(VersionConvertorFactory_14_40.class,
|
||||
org.hl7.fhir.dstu2016may.model.InstantType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r4.model.InstantType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_14_50.class,
|
||||
getConversionParams(VersionConvertorFactory_14_50.class,
|
||||
org.hl7.fhir.dstu2016may.model.InstantType.class, org.hl7.fhir.dstu2016may.model.Type.class,
|
||||
org.hl7.fhir.r5.model.InstantType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_40.class,
|
||||
getConversionParams(VersionConvertorFactory_30_40.class,
|
||||
org.hl7.fhir.dstu3.model.InstantType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r4.model.InstantType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_30_50.class,
|
||||
getConversionParams(VersionConvertorFactory_30_50.class,
|
||||
org.hl7.fhir.dstu3.model.InstantType.class, org.hl7.fhir.dstu3.model.Type.class,
|
||||
org.hl7.fhir.r5.model.InstantType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
INSTANT_PRECISION_STRINGS),
|
||||
getDateTimeArgs(VersionConvertorFactory_40_50.class,
|
||||
getConversionParams(VersionConvertorFactory_40_50.class,
|
||||
org.hl7.fhir.r4.model.InstantType.class, org.hl7.fhir.r4.model.Type.class,
|
||||
org.hl7.fhir.r5.model.InstantType.class, org.hl7.fhir.r5.model.DataType.class,
|
||||
INSTANT_PRECISION_STRINGS)
|
||||
|
|
Loading…
Reference in New Issue