Skip to content

Commit

Permalink
FM2-604: Follow-up: fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Jul 12, 2023
1 parent 7ab2e3a commit 36ab237
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ public void shouldReturnLastnObservationsAsJson() throws Exception {
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(2));
Expand Down Expand Up @@ -615,7 +615,7 @@ public void shouldReturnLastnObservationsWhenMaxIsMissingAsJson() throws Excepti
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(1));
Expand Down Expand Up @@ -646,7 +646,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsPassedInPatientPa
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(2));
Expand Down Expand Up @@ -674,7 +674,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsMissingAsJson() t
assertThat(entries, everyItem(hasResource(instanceOf(Observation.class))));
assertThat(entries, everyItem(hasResource(validResource())));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(2));
Expand Down Expand Up @@ -704,7 +704,7 @@ public void shouldReturnLastnObservationsWhenCategoryIsMissingAsJson() throws Ex
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, isSortedAndWithinMax(2));
}

Expand Down Expand Up @@ -785,7 +785,7 @@ public void shouldReturnLastnObservationsAsXml() throws Exception {
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(2));
Expand Down Expand Up @@ -816,7 +816,7 @@ public void shouldReturnLastnObservationsWhenMaxIsMissingAsXml() throws Exceptio
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(1));
Expand Down Expand Up @@ -847,7 +847,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsPassedInPatientPa
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(2));
Expand Down Expand Up @@ -875,7 +875,7 @@ public void shouldReturnLastnObservationsWhenPatientReferenceIsMissingAsXml() th
assertThat(entries, everyItem(hasResource(instanceOf(Observation.class))));
assertThat(entries, everyItem(hasResource(validResource())));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(entries, isSortedAndWithinMax(2));
Expand Down Expand Up @@ -905,7 +905,7 @@ public void shouldReturnLastnObservationsWhenCategoryIsMissingAsXml() throws Exc
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(hasResource(
hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Respiratory rate"))))))));
hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Respiratory rate"))))))));
assertThat(entries, isSortedAndWithinMax(2));
}

Expand Down Expand Up @@ -985,7 +985,7 @@ public void shouldReturnLastnEncountersObservationsAsJson() throws Exception {
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
Expand Down Expand Up @@ -1016,7 +1016,7 @@ public void shouldReturnLastnEncountersObservationsWhenMaxIsMissingAsJson() thro
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(1));
Expand Down Expand Up @@ -1048,7 +1048,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsPassedI
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
Expand Down Expand Up @@ -1076,7 +1076,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsMissing
assertThat(entries, everyItem(hasResource(instanceOf(Observation.class))));
assertThat(entries, everyItem(hasResource(validResource())));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
Expand Down Expand Up @@ -1107,7 +1107,7 @@ public void shouldReturnLastnEncountersObservationsWhenCategoryIsMissingAsJson()
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
}

Expand Down Expand Up @@ -1188,7 +1188,7 @@ public void shouldReturnLastnEncountersObservationsAsXml() throws Exception {
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
Expand Down Expand Up @@ -1219,7 +1219,7 @@ public void shouldReturnLastnEncountersObservationsWhenMaxIsMissingAsXml() throw
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(1));
Expand Down Expand Up @@ -1251,7 +1251,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsPassedI
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
Expand Down Expand Up @@ -1279,7 +1279,7 @@ public void shouldReturnLastnEncountersObservationsWhenPatientReferenceIsMissing
assertThat(entries, everyItem(hasResource(instanceOf(Observation.class))));
assertThat(entries, everyItem(hasResource(validResource())));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(entries, everyItem(hasResource(hasProperty("category",
everyItem(hasProperty("coding", everyItem(hasProperty("code", equalTo("laboratory")))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
Expand Down Expand Up @@ -1310,7 +1310,7 @@ public void shouldReturnLastnEncountersObservationsWhenCategoryIsMissingAsXml()
assertThat(entries,
everyItem(hasResource(hasProperty("subject", hasProperty("reference", endsWith(OBS_PATIENT_UUID))))));
assertThat(entries, everyItem(
hasResource(hasProperty("code", hasProperty("coding", everyItem(hasProperty("display", equalTo("Weight"))))))));
hasResource(hasProperty("code", hasProperty("coding", hasItem(hasProperty("display", equalTo("Weight"))))))));
assertThat(getDistinctEncounterDatetime(entries), lessThanOrEqualTo(2));
}

Expand Down
Loading

0 comments on commit 36ab237

Please sign in to comment.