Merge branch 'java9' of github.com:jamesagnew/hapi-fhir into java9
This commit is contained in:
commit
58fe4ba3eb
|
@ -14,6 +14,7 @@ import org.junit.AfterClass;
|
|||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
|
@ -188,7 +189,8 @@ public class CdsExampleTests {
|
|||
Assert.assertTrue(procedureRequest.getDoNotPerform());
|
||||
}
|
||||
|
||||
//@Test
|
||||
@Test
|
||||
@Ignore
|
||||
public void CdsHooksPatientViewTest() throws IOException {
|
||||
putResource("cds-bcs-library.json", "patient-view");
|
||||
putResource("cds-bcs-patient.json", "Patient-6532");
|
||||
|
|
|
@ -72,6 +72,7 @@ public class BuiltJarDstu2IT {
|
|||
* android uses) and see if this passes
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void testClient() {
|
||||
FhirContext ctx = FhirContext.forDstu2();
|
||||
try {
|
||||
|
|
|
@ -190,7 +190,7 @@ public class GenericClientDstu3IT {
|
|||
@Test
|
||||
public void testClientFailures() throws Exception {
|
||||
ResponseBody body = mock(ResponseBody.class);
|
||||
when(body.source()).thenThrow(IllegalStateException.class, RuntimeException.class, Exception.class);
|
||||
when(body.source()).thenThrow(IllegalStateException.class, RuntimeException.class);
|
||||
|
||||
myHttpResponse = new Response.Builder()
|
||||
.request(myRequest)
|
||||
|
@ -216,12 +216,6 @@ public class GenericClientDstu3IT {
|
|||
assertEquals("java.lang.RuntimeException", e.toString());
|
||||
}
|
||||
|
||||
try {
|
||||
client.read().resource(Patient.class).withId("1").execute();
|
||||
fail();
|
||||
} catch (FhirClientConnectionException e) {
|
||||
assertEquals("java.lang.Exception", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -77,6 +77,21 @@
|
|||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>javax.mail-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.helger</groupId>
|
||||
<artifactId>ph-schematron</artifactId>
|
||||
|
|
|
@ -1228,38 +1228,6 @@ public class XmlParserHl7OrgDstu2Test {
|
|||
"<given value=\"Shmoe\"><extension url=\"http://examples.com#givenext_parent\"><extension url=\"http://examples.com#givenext_child\"><valueString value=\"CHILD\"/></extension></extension></given>"));
|
||||
}
|
||||
|
||||
// Narrative generation not currently supported for HL7org structures
|
||||
public void testNarrativeGeneration() throws DataFormatException, IOException {
|
||||
|
||||
org.hl7.fhir.instance.model.Patient patient = new org.hl7.fhir.instance.model.Patient();
|
||||
patient.addName().addFamily("Smith");
|
||||
Organization org = new Organization();
|
||||
patient.getManagingOrganization().setResource(org);
|
||||
|
||||
INarrativeGenerator gen = new INarrativeGenerator() {
|
||||
|
||||
@Override
|
||||
public void generateNarrative(FhirContext theContext, IBaseResource theResource, INarrative theNarrative) {
|
||||
try {
|
||||
theNarrative.setDivAsString("<div>help</div>");
|
||||
} catch (Exception e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
theNarrative.setStatusAsString("generated");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
FhirContext context = ourCtx;
|
||||
context.setNarrativeGenerator(gen);
|
||||
IParser p = context.newXmlParser();
|
||||
String str = p.encodeResourceToString(patient);
|
||||
|
||||
ourLog.info(str);
|
||||
|
||||
assertThat(str, StringContains.containsString(",\"text\":{\"status\":\"generated\",\"div\":\"<div>help</div>\"},"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNestedContainedResources() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue