This commit is contained in:
James Agnew 2019-07-07 13:50:51 -04:00
parent 1bbf962685
commit 6cf46e16ac
1 changed files with 5 additions and 4 deletions

View File

@ -51,6 +51,9 @@ public class OperationDuplicateServerHl7OrgDstu2Test {
ourLog.info(response);
Conformance resp = ourCtx.newXmlParser().parseResource(Conformance.class, response);
ourLog.info(ourCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(resp));
assertEquals(3, resp.getRest().get(0).getOperation().size());
assertEquals("$myoperation", resp.getRest().get(0).getOperation().get(0).getName());
assertEquals("OperationDefinition/-s-myoperation", resp.getRest().get(0).getOperation().get(0).getDefinition().getReference());
@ -58,7 +61,7 @@ public class OperationDuplicateServerHl7OrgDstu2Test {
// OperationDefinition
{
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/OperationDefinition/myoperation?_pretty=true");
HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/OperationDefinition/Patient--myoperation?_pretty=true");
HttpResponse status = ourClient.execute(httpGet);
assertEquals(200, status.getStatusLine().getStatusCode());
@ -67,11 +70,9 @@ public class OperationDuplicateServerHl7OrgDstu2Test {
ourLog.info(response);
OperationDefinition resp = ourCtx.newXmlParser().parseResource(OperationDefinition.class, response);
assertEquals(true, resp.getSystemElement().getValue().booleanValue());
assertEquals("$myoperation", resp.getCode());
assertEquals(true, resp.getIdempotent());
assertEquals(2, resp.getType().size());
assertThat(Arrays.asList(resp.getType().get(0).getValue(), resp.getType().get(1).getValue()), containsInAnyOrder("Organization", "Patient"));
assertEquals(1, resp.getType().size());
assertEquals(1, resp.getParameter().size());
}
}