Skip to content

Commit 9eb794e

Browse files
issue 414 minor format chanages
Signed-off-by: Albert Wang <xuwang@us.ibm.com>
1 parent de37dd3 commit 9eb794e

2 files changed

Lines changed: 16 additions & 65 deletions

File tree

fhir-server-test/src/test/java/com/ibm/fhir/server/test/SearchTest.java

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -167,52 +167,14 @@ public void testCreatePersonWithManyIdentifiers() throws Exception {
167167
TestUtil.assertResourceEquals(person, responsePerson);
168168
}
169169

170-
// // Uncomment in order to test the limits when using the 'normalized' model with
171-
// // Db2
172-
// @Test(groups = { "server-search" })
173-
// public void testCreatePersonWithTooManyLinks() throws Exception {
174-
// // Build a new Person with a single identifier and then call call 'create-on-update'.
175-
// // This will ensure that the search parameters are added to the cache before we insert one with a thousand of
176-
// //them.
177-
// String identifier = UUID.randomUUID().toString();
178-
// String patientRef = "Patient/" + identifier;
179-
// Person person = createPersonWithIdentifierAndLink(identifier, patientRef);
180-
//
181-
// // Update the person with a bunch more links to exceed the limit
182-
// addLinks(person, 1024 / 4);
183-
// FHIRResponse response = client.update(person);
184-
// assertResponse(response, Response.Status.REQUEST_ENTITY_TOO_LARGE.getStatusCode());
185-
// }
186-
//
187-
// @Test(groups = { "server-search" })
188-
// public void testCreatePersonWithTooManyIdentifiers() throws Exception {
189-
// // Build a new Person with a single identifier and then call call 'create-on-update'.
190-
// // This will ensure that the search parameters are added to the cache before we insert one with a thousand of
191-
// //them.
192-
// String identifier = UUID.randomUUID().toString();
193-
// String patientRef = "Patient/" + identifier;
194-
// Person person = createPersonWithIdentifierAndLink(identifier, patientRef);
195-
//
196-
// // Update the person with a bunch more links to exceed the limit
197-
// addIdentifiers(person, 1024);
198-
// FHIRResponse response = client.update(person);
199-
// assertResponse(response, Response.Status.REQUEST_ENTITY_TOO_LARGE.getStatusCode());
200-
// }
201-
202170
private Person createPersonWithIdentifierAndLink(String identifier, String patientRef) throws Exception {
203171
String id = UUID.randomUUID().toString();
204172

205173
Person person =
206-
Person.builder()
207-
.id(Id.of(id))
208-
.identifier(Identifier.builder()
209-
.value(string(identifier))
210-
.system(uri("test"))
211-
.build())
212-
.link(Link.builder()
213-
.target(Reference.builder().reference(string(patientRef)).build())
214-
.build())
215-
.build();
174+
Person.builder().id(Id.of(id))
175+
.identifier(Identifier.builder().value(string(identifier)).system(uri("test")).build())
176+
.link(Link.builder().target(Reference.builder().reference(string(patientRef)).build()).build())
177+
.build();
216178

217179
FHIRResponse createResponse = client.update(person);
218180
assertResponse(createResponse, Response.Status.CREATED.getStatusCode());

fhir-server-test/src/test/java/com/ibm/fhir/server/test/SortingTest.java

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,7 @@ public void testCreateObservation5() throws Exception {
278278

279279
// Patient?gender=male&_sort:asc=family
280280
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
281-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
282-
"testCreatePatient5" })
281+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
283282
public void testSortAscending() {
284283
WebTarget target = getWebTarget();
285284
Response response =
@@ -313,8 +312,7 @@ public void testSortAscending() {
313312
// Patient?gender=male&_sort:asc=family
314313
@SuppressWarnings("rawtypes")
315314
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
316-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
317-
"testCreatePatient5" })
315+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
318316
public void testSortAscending_filter_elements() throws Exception {
319317
WebTarget target = getWebTarget();
320318
Response response =
@@ -387,8 +385,7 @@ public void testSortAscending_filter_elements() throws Exception {
387385

388386
// Patient?gender=male&_sort:desc=family
389387
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
390-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
391-
"testCreatePatient5" })
388+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
392389
public void testSortDescending() {
393390
WebTarget target = getWebTarget();
394391
Response response =
@@ -422,8 +419,7 @@ public void testSortDescending() {
422419

423420
// Patient?gender=male&_sort=telecom
424421
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
425-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
426-
"testCreatePatient5" })
422+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
427423
public void testSortTelecom() {
428424
WebTarget target = getWebTarget();
429425
Response response =
@@ -457,8 +453,7 @@ public void testSortTelecom() {
457453

458454
// Patient?gender=male&_sort:desc=birthDate
459455
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
460-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
461-
"testCreatePatient5" })
456+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
462457
public void testSortBirthDate() {
463458
WebTarget target = getWebTarget();
464459
Response response =
@@ -480,8 +475,7 @@ public void testSortBirthDate() {
480475

481476
// Patient?gender=male&_sort:desc=family&_sort:asc=birthdate
482477
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
483-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
484-
"testCreatePatient5" })
478+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
485479
public void testSortTwoParameters() {
486480
WebTarget target = getWebTarget();
487481
Response response =
@@ -535,8 +529,7 @@ public void testSortTwoParameters() {
535529

536530
// Patient?gender=male&_sort:desc=family&_sort:desc=birthdate
537531
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
538-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
539-
"testCreatePatient5" })
532+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
540533
public void testSortTwoParametersDescending() {
541534
WebTarget target = getWebTarget();
542535
Response response =
@@ -587,14 +580,13 @@ public void testSortTwoParametersDescending() {
587580

588581
// Observation?status=final&code=http://loinc.org|55284-4&_sort:asc=component-value-quantity
589582
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreateObservation1",
590-
"testCreateObservation2", "testCreateObservation3",
591-
"testCreateObservation5" })
583+
"testCreateObservation2", "testCreateObservation3", "testCreateObservation5" })
592584
public void testSortValueQuantityAscending() {
593585
WebTarget target = getWebTarget();
594586
// we do support coding instead of code for the pipe search.
595587
Response response =
596588
target.path("Observation").queryParam("status", "final").queryParam("code", "55284-4")
597-
.queryParam("_count", "50").queryParam("_sort:asc", "component-value-quantity")
589+
.queryParam("_count", "100").queryParam("_sort:asc", "component-value-quantity")
598590
.request(FHIRMediaType.APPLICATION_FHIR_JSON).get();
599591
assertResponse(response, Response.Status.OK.getStatusCode());
600592
Bundle bundle = response.readEntity(Bundle.class);
@@ -789,8 +781,7 @@ public static java.time.Instant getInstantFromPartial(TemporalAccessor ta) {
789781
// Patient?gender=male&_sort:asc=family
790782
@SuppressWarnings("rawtypes")
791783
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
792-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
793-
"testCreatePatient5" })
784+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
794785
public void testSortAscending_filter_summary() throws Exception {
795786
WebTarget target = getWebTarget();
796787
Response response =
@@ -863,8 +854,7 @@ public void testSortAscending_filter_summary() throws Exception {
863854
// Patient?gender=male&_sort:asc=family
864855
@SuppressWarnings("rawtypes")
865856
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
866-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
867-
"testCreatePatient5" })
857+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
868858
public void testSortAscending_filter_elements_summary() throws Exception {
869859
WebTarget target = getWebTarget();
870860
// The _summary=true should be ignored.
@@ -940,8 +930,7 @@ public void testSortAscending_filter_elements_summary() throws Exception {
940930

941931
// Patient?gender=male&_sort:asc=family
942932
@Test(groups = { "server-search" }, dependsOnMethods = { "testCreatePatient1",
943-
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4",
944-
"testCreatePatient5" })
933+
"testCreatePatient2", "testCreatePatient3", "testCreatePatient4", "testCreatePatient5" })
945934
public void testSortAscending_filter_summary_count() throws Exception {
946935
WebTarget target = getWebTarget();
947936
Response response =

0 commit comments

Comments
 (0)