From 4bd869095f95adc155c0fe6f6587db181d98c4aa Mon Sep 17 00:00:00 2001 From: Michael Seaton Date: Fri, 20 Dec 2024 15:11:07 -0500 Subject: [PATCH] Fix incorrect integration test --- ...upFhirResourceProviderIntegrationTest.java | 7 ++--- .../FhirCohortDaoImplTest_initial_data.xml | 31 +++++++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/GroupFhirResourceProviderIntegrationTest.java b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/GroupFhirResourceProviderIntegrationTest.java index 7908b56244..3bb0a8a069 100644 --- a/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/GroupFhirResourceProviderIntegrationTest.java +++ b/integration-tests/src/test/java/org/openmrs/module/fhir2/providers/r4/GroupFhirResourceProviderIntegrationTest.java @@ -45,8 +45,6 @@ public class GroupFhirResourceProviderIntegrationTest extends BaseFhirR4Integrat private static final String COHORT_DATA_XML = "org/openmrs/module/fhir2/api/dao/impl/FhirCohortDaoImplTest_initial_data.xml"; - private static final String PATIENT_DATA_XML = "org/openmrs/module/fhir2/api/dao/impl/FhirPatientDaoImplTest_initial_data.xml"; - private static final String JSON_CREATE_GROUP_DOCUMENT = "org/openmrs/module/fhir2/providers/GroupWebTest_create.json"; private static final String XML_CREATE_GROUP_DOCUMENT = "org/openmrs/module/fhir2/providers/GroupWebTest_create.xml"; @@ -63,7 +61,6 @@ public class GroupFhirResourceProviderIntegrationTest extends BaseFhirR4Integrat @Override public void setup() throws Exception { super.setup(); - executeDataSet(PATIENT_DATA_XML); executeDataSet(COHORT_DATA_XML); } @@ -387,7 +384,7 @@ public void shouldReturnNotFoundWhenDeletingNonExistentGroup() throws Exception @Test public void shouldReturnCountForGroupAsJson() throws Exception { - MockHttpServletResponse response = get("/Group?_summary=count").accept(FhirMediaTypes.JSON).go(); + MockHttpServletResponse response = get("/Group").accept(FhirMediaTypes.JSON).go(); assertThat(response, isOk()); assertThat(response.getContentType(), is(FhirMediaTypes.JSON.toString())); @@ -402,7 +399,7 @@ public void shouldReturnCountForGroupAsJson() throws Exception { @Test public void shouldReturnCountForGroupAsXml() throws Exception { - MockHttpServletResponse response = get("/Group?_summary=count").accept(FhirMediaTypes.XML).go(); + MockHttpServletResponse response = get("/Group").accept(FhirMediaTypes.XML).go(); assertThat(response, isOk()); assertThat(response.getContentType(), is(FhirMediaTypes.XML.toString())); diff --git a/test-data/src/main/resources/org/openmrs/module/fhir2/api/dao/impl/FhirCohortDaoImplTest_initial_data.xml b/test-data/src/main/resources/org/openmrs/module/fhir2/api/dao/impl/FhirCohortDaoImplTest_initial_data.xml index 4527f4c009..55759daa89 100644 --- a/test-data/src/main/resources/org/openmrs/module/fhir2/api/dao/impl/FhirCohortDaoImplTest_initial_data.xml +++ b/test-data/src/main/resources/org/openmrs/module/fhir2/api/dao/impl/FhirCohortDaoImplTest_initial_data.xml @@ -9,6 +9,37 @@ graphic logo is a trademark of OpenMRS Inc. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +