From 6cf46e16ac0c9b73aa6e18db6a31449630cc6910 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Sun, 7 Jul 2019 13:50:51 -0400 Subject: [PATCH] Test fix --- .../server/OperationDuplicateServerHl7OrgDstu2Test.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/rest/server/OperationDuplicateServerHl7OrgDstu2Test.java b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/rest/server/OperationDuplicateServerHl7OrgDstu2Test.java index 6a8483e3777..55b80b322bf 100644 --- a/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/rest/server/OperationDuplicateServerHl7OrgDstu2Test.java +++ b/hapi-fhir-structures-hl7org-dstu2/src/test/java/ca/uhn/fhir/rest/server/OperationDuplicateServerHl7OrgDstu2Test.java @@ -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()); } }