public void Can_ConvertElement_R3_Annotation_To_R4_Annotation() { var r3TypeInstance = new R3Model.Annotation { Author = new FhirString("Kenneth Myhra"), Time = "20:36", Text = "This is the annotation" }; var r4TypeInstance = new FhirConverter(FhirVersion.R4, FhirVersion.R3) .Convert <Annotation, R3Model.Annotation>(r3TypeInstance); Assert.NotNull(r4TypeInstance); Assert.Equal(((FhirString)r3TypeInstance.Author).Value, ((FhirString)r4TypeInstance.Author).Value); Assert.Equal(r3TypeInstance.Time, r4TypeInstance.Time); Assert.Equal(r3TypeInstance.Text, r4TypeInstance.Text?.Value); }
private static void ConvertAnnotation(TargetModel.Annotation to, SourceModel.Annotation from, FhirConverter converter) { to.TextElement = ConvertMarkdownToFhirString(from.Text, converter); }