Fix build
This commit is contained in:
parent
b48843a128
commit
9758f32021
|
@ -1078,7 +1078,7 @@ public class JsonParserHl7OrgTest {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testParseWithIncorrectReference() throws IOException {
|
public void testParseWithIncorrectReference() throws IOException {
|
||||||
String jsonString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general.json"));
|
String jsonString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general-hl7orgdstu2.json"));
|
||||||
jsonString = jsonString.replace("\"reference\"", "\"resource\"");
|
jsonString = jsonString.replace("\"reference\"", "\"resource\"");
|
||||||
Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, jsonString);
|
Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, jsonString);
|
||||||
assertEquals("Organization/1", parsed.getManagingOrganization().getReference());
|
assertEquals("Organization/1", parsed.getManagingOrganization().getReference());
|
||||||
|
@ -1087,7 +1087,7 @@ public class JsonParserHl7OrgTest {
|
||||||
@Test
|
@Test
|
||||||
public void testSimpleParse() throws DataFormatException, IOException {
|
public void testSimpleParse() throws DataFormatException, IOException {
|
||||||
|
|
||||||
String msg = IOUtils.toString(XmlParser.class.getResourceAsStream("/example-patient-general.json"));
|
String msg = IOUtils.toString(XmlParser.class.getResourceAsStream("/example-patient-general-hl7orgdstu2.json"));
|
||||||
IParser p = ourCtx.newJsonParser();
|
IParser p = ourCtx.newJsonParser();
|
||||||
// ourLog.info("Reading in message: {}", msg);
|
// ourLog.info("Reading in message: {}", msg);
|
||||||
Patient res = p.parseResource(Patient.class, msg);
|
Patient res = p.parseResource(Patient.class, msg);
|
||||||
|
@ -1104,7 +1104,7 @@ public class JsonParserHl7OrgTest {
|
||||||
@Test
|
@Test
|
||||||
public void testSimpleResourceEncode() throws IOException {
|
public void testSimpleResourceEncode() throws IOException {
|
||||||
|
|
||||||
String xmlString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general.xml"), Charset.forName("UTF-8"));
|
String xmlString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general-hl7orgdstu2.xml"), Charset.forName("UTF-8"));
|
||||||
Patient obs = ourCtx.newXmlParser().parseResource(Patient.class, xmlString);
|
Patient obs = ourCtx.newXmlParser().parseResource(Patient.class, xmlString);
|
||||||
|
|
||||||
List<Extension> undeclaredExtensions = obs.getContact().get(0).getName().getFamily().get(0).getExtension();
|
List<Extension> undeclaredExtensions = obs.getContact().get(0).getName().getFamily().get(0).getExtension();
|
||||||
|
@ -1117,7 +1117,7 @@ public class JsonParserHl7OrgTest {
|
||||||
String encoded = jsonParser.encodeResourceToString(obs);
|
String encoded = jsonParser.encodeResourceToString(obs);
|
||||||
ourLog.info(encoded);
|
ourLog.info(encoded);
|
||||||
|
|
||||||
String jsonString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general.json"), Charset.forName("UTF-8"));
|
String jsonString = IOUtils.toString(JsonParser.class.getResourceAsStream("/example-patient-general-hl7orgdstu2.json"), Charset.forName("UTF-8"));
|
||||||
|
|
||||||
JSON expected = JSONSerializer.toJSON(jsonString);
|
JSON expected = JSONSerializer.toJSON(jsonString);
|
||||||
JSON actual = JSONSerializer.toJSON(encoded.trim());
|
JSON actual = JSONSerializer.toJSON(encoded.trim());
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -518,6 +518,9 @@
|
||||||
<copy todir="target/site/xref-base">
|
<copy todir="target/site/xref-base">
|
||||||
<fileset dir="hapi-fhir-base/target/site/xref"/>
|
<fileset dir="hapi-fhir-base/target/site/xref"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
<copy todir="target/site/cobertura">
|
||||||
|
<fileset dir="hapi-fhir-cobertura/target/site/cobertura"/>
|
||||||
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
@ -893,6 +896,7 @@
|
||||||
<module>hapi-fhir-structures-dstu2</module>
|
<module>hapi-fhir-structures-dstu2</module>
|
||||||
<module>hapi-fhir-structures-hl7org-dstu2</module>
|
<module>hapi-fhir-structures-hl7org-dstu2</module>
|
||||||
<module>hapi-fhir-jpaserver-base</module>
|
<module>hapi-fhir-jpaserver-base</module>
|
||||||
|
<module>hapi-fhir-cobertura</module>
|
||||||
<module>examples</module>
|
<module>examples</module>
|
||||||
</modules>
|
</modules>
|
||||||
<reporting>
|
<reporting>
|
||||||
|
|
Loading…
Reference in New Issue