Add tests and changes for Url

This commit is contained in:
dotasek 2022-03-18 15:03:01 -04:00
parent 6e45dd522e
commit 48d6829abf
2 changed files with 8 additions and 2 deletions

View File

@ -5,13 +5,13 @@ import org.hl7.fhir.exceptions.FHIRException;
public class Url40_50 {
public static org.hl7.fhir.r5.model.UrlType convertUrl(org.hl7.fhir.r4.model.UrlType src) throws FHIRException {
org.hl7.fhir.r5.model.UrlType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UrlType(src.getValue()) : new org.hl7.fhir.r5.model.UrlType();
org.hl7.fhir.r5.model.UrlType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UrlType(src.getValueAsString()) : new org.hl7.fhir.r5.model.UrlType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}
public static org.hl7.fhir.r4.model.UrlType convertUrl(org.hl7.fhir.r5.model.UrlType src) throws FHIRException {
org.hl7.fhir.r4.model.UrlType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UrlType(src.getValue()) : new org.hl7.fhir.r4.model.UrlType();
org.hl7.fhir.r4.model.UrlType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UrlType(src.getValueAsString()) : new org.hl7.fhir.r4.model.UrlType();
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt);
return tgt;
}

View File

@ -608,6 +608,12 @@ public class VersionConvertorPrimitiveTypeTests {
org.hl7.fhir.r5.model.UriType.class, org.hl7.fhir.r5.model.DataType.class,
URI_STRINGS),
//Url
getFactoryConversionParams(VersionConvertorFactory_40_50.class,
org.hl7.fhir.r4.model.UrlType.class, org.hl7.fhir.r4.model.Type.class,
org.hl7.fhir.r5.model.UrlType.class, org.hl7.fhir.r5.model.DataType.class,
URI_STRINGS),
//Uuid
getFactoryConversionParams(VersionConvertorFactory_10_30.class,
org.hl7.fhir.dstu2.model.UuidType.class, org.hl7.fhir.dstu2.model.Type.class,