Add test for #347

This commit is contained in:
jamesagnew 2016-04-23 18:19:30 -04:00
parent 514da88787
commit 3ceac6d576
1 changed files with 16 additions and 0 deletions

View File

@ -115,6 +115,22 @@ public class XmlParserDstu3Test {
ourCtx.setNarrativeGenerator(null);
}
/**
* See #347
*/
@Test
public void testEncodeAndParseMedicationOrder() {
MedicationOrder mo = new MedicationOrder();
mo.getDateWrittenElement().setValueAsString("2015-10-05");
String encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(mo);
ourLog.info(encoded);
mo = ourCtx.newXmlParser().parseResource(MedicationOrder.class, encoded);
assertEquals("2015-10-05", mo.getDateWrittenElement().getValueAsString());
}
@Test
public void testBundleWithBinary() {
//@formatter:off