Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class FhirCapabilitiesIT extends AbstractFhirTestSupport {
public void testOfType() throws Exception {
org.hl7.fhir.instance.model.api.IBaseConformance result = requestBody("direct://OF_TYPE", CapabilityStatement.class);

LOG.debug("ofType: " + result);
LOG.debug("ofType: {}", result);
assertNotNull(result, "ofType result");
assertEquals(Enumerations.PublicationStatus.ACTIVE, ((CapabilityStatement) result).getStatus());
}
Expand All @@ -75,7 +75,7 @@ public void testEncodeJSON() throws Exception {
org.hl7.fhir.instance.model.api.IBaseConformance result
= requestBodyAndHeaders("direct://OF_TYPE", CapabilityStatement.class, headers);

LOG.debug("ofType: " + result);
LOG.debug("ofType: {}", result);
assertNotNull(result, "ofType result");
assertEquals(Enumerations.PublicationStatus.ACTIVE, ((CapabilityStatement) result).getStatus());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void testCreateResource() throws Exception {

MethodOutcome result = requestBody("direct://RESOURCE", patient);

LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertNotNull(result, "resource result");
assertTrue(result.getCreated());
}
Expand All @@ -76,7 +76,7 @@ public void testCreateStringResource() throws Exception {

MethodOutcome result = requestBody("direct://RESOURCE_STRING", patientString);

LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertNotNull(result, "resource result");
assertTrue(result.getCreated());
}
Expand All @@ -89,7 +89,7 @@ public void testCreateStringResourceEncodeXml() throws Exception {
headers.put(ExtraParameters.ENCODE_XML.getHeaderName(), Boolean.TRUE);
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_STRING", patientString, headers);

LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertNotNull(result, "resource result");
assertTrue(result.getCreated());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void testDeleteResource() throws Exception {
// using org.hl7.fhir.instance.model.api.IBaseResource message body for single parameter "resource"
MethodOutcome result = requestBody("direct://RESOURCE", this.patient);

LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertNotNull(result, "resource result");
assertFalse(patientExists());
}
Expand All @@ -76,7 +76,7 @@ public void testDeleteResourceById() throws Exception {
// using org.hl7.fhir.instance.model.api.IIdType message body for single parameter "id"
MethodOutcome result = requestBody("direct://RESOURCE_BY_ID", this.patient.getIdElement());

LOG.debug("resourceById: " + result);
LOG.debug("resourceById: {}", result);
assertNotNull(result, "resourceById result");
assertFalse(patientExists());
}
Expand All @@ -93,7 +93,7 @@ public void testDeleteResourceByStringId() throws Exception {

MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_BY_STRING_ID", null, headers);

LOG.debug("resourceById: " + result);
LOG.debug("resourceById: {}", result);
assertNotNull(result, "resourceById result");
assertFalse(patientExists());
}
Expand All @@ -105,7 +105,7 @@ public void testDeleteResourceConditionalByUrl() throws Exception {
MethodOutcome result
= requestBody("direct://RESOURCE_CONDITIONAL_BY_URL", "Patient?given=Vincent&family=Freeman");

LOG.debug("resourceConditionalByUrl: " + result);
LOG.debug("resourceConditionalByUrl: {}", result);
assertNotNull(result, "resourceConditionalByUrl result");
assertFalse(patientExists());
}
Expand All @@ -119,7 +119,7 @@ public void testDeleteResourceConditionalByUrlCacheControlDirective() throws Exc
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_CONDITIONAL_BY_URL",
"Patient?given=Vincent&family=Freeman", headers);

LOG.debug("resourceConditionalByUrl: " + result);
LOG.debug("resourceConditionalByUrl: {}", result);
assertNotNull(result, "resourceConditionalByUrl result");
assertFalse(patientExists());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void testEncodeRequestToXml() throws Exception {

Bundle result = requestBodyAndHeaders("direct://SEARCH_BY_URL", url, headers);

LOG.debug("searchByUrl: " + result);
LOG.debug("searchByUrl: {}", result);
assertNotNull(result, "searchByUrl result");
Patient patient = (Patient) result.getEntry().get(0).getResource();
assertNotNull(patient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testOnInstance() throws Exception {

Bundle result = requestBodyAndHeaders("direct://ON_INSTANCE", null, headers);

LOG.debug("onInstance: " + result);
LOG.debug("onInstance: {}", result);
assertNotNull(result, "onInstance result");
assertEquals(1, result.getEntry().size());
}
Expand All @@ -81,7 +81,7 @@ public void testOnServer() throws Exception {
headers.put("CamelFhir.count", 1);
Bundle result = requestBodyAndHeaders("direct://ON_SERVER", null, headers);

LOG.debug("onServer: " + result);
LOG.debug("onServer: {}", result);
assertNotNull(result, "onServer result");
assertEquals(1, result.getEntry().size());
}
Expand All @@ -98,7 +98,7 @@ public void testOnType() throws Exception {

Bundle result = requestBodyAndHeaders("direct://ON_TYPE", null, headers);

LOG.debug("onType: " + result);
LOG.debug("onType: {}", result);
assertNotNull(result, "onType result");
assertEquals(1, result.getEntry().size());
}
Expand All @@ -117,7 +117,7 @@ public void testOnTypeWithSubsetElements() throws Exception {

Bundle result = requestBodyAndHeaders("direct://ON_TYPE", null, headers);

LOG.debug("onType: " + result);
LOG.debug("onType: {}", result);
assertNotNull(result, "onType result");
assertEquals(1, result.getEntry().size());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void testByUrl() throws Exception {

IBaseBundle result = requestBodyAndHeaders("direct://BY_URL", null, headers);

LOG.debug("byUrl: " + result);
LOG.debug("byUrl: {}", result);
assertNotNull(result, "byUrl result");
}

Expand All @@ -99,7 +99,7 @@ public void testNext() throws Exception {
Bundle result = requestBody("direct://NEXT", bundle);

assertNotNull(result, "next result");
LOG.debug("next: " + result);
LOG.debug("next: {}", result);
}

@Test
Expand All @@ -117,7 +117,7 @@ public void testPrevious() throws Exception {
// using org.hl7.fhir.instance.model.api.IBaseBundle message body for single parameter "bundle"
Bundle result = requestBody("direct://PREVIOUS", bundle);

LOG.debug("previous: " + result);
LOG.debug("previous: {}", result);
assertNotNull(result, "previous result");
}

Expand All @@ -138,7 +138,7 @@ public void testPreviousWithEncodingEnum() throws Exception {
// using org.hl7.fhir.instance.model.api.IBaseBundle message body for single parameter "bundle"
Bundle result = requestBodyAndHeaders("direct://PREVIOUS", bundle, headers);

LOG.debug("previous: " + result);
LOG.debug("previous: {}", result);
assertNotNull(result, "previous result");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void testAdd() throws Exception {

IBaseMetaType result = requestBodyAndHeaders("direct://ADD", null, headers);

LOG.debug("add: " + result);
LOG.debug("add: {}", result);
assertNotNull(result, "add result");
assertEquals(1, result.getTag().size());
}
Expand All @@ -99,7 +99,7 @@ public void testDelete() throws Exception {

IBaseMetaType result = requestBodyAndHeaders("direct://DELETE", null, headers);

LOG.debug("delete: " + result);
LOG.debug("delete: {}", result);
assertNotNull(result, "delete result");
assertEquals(0, result.getTag().size());
}
Expand All @@ -114,7 +114,7 @@ public void testGetFromResource() throws Exception {

IBaseMetaType result = requestBodyAndHeaders("direct://GET_FROM_RESOURCE", null, headers);

LOG.debug("getFromResource: " + result);
LOG.debug("getFromResource: {}", result);
assertNotNull(result, "getFromResource result");
assertEquals(0, result.getTag().size());
}
Expand All @@ -124,7 +124,7 @@ public void testGetFromServer() throws Exception {
// using Class message body for single parameter "metaType"
IBaseMetaType result = requestBody("direct://GET_FROM_SERVER", Meta.class);
assertNotNull(result, "getFromServer result");
LOG.debug("getFromServer: " + result);
LOG.debug("getFromServer: {}", result);
}

@Test
Expand All @@ -137,7 +137,7 @@ public void testGetFromType() throws Exception {

IBaseMetaType result = requestBodyAndHeaders("direct://GET_FROM_TYPE", null, headers);

LOG.debug("getFromType: " + result);
LOG.debug("getFromType: {}", result);
assertNotNull(result, "getFromType result");
}

Expand All @@ -152,7 +152,7 @@ public void testGetFromTypePreferResponseType() throws Exception {

Meta result = requestBodyAndHeaders("direct://GET_FROM_TYPE", null, headers);

LOG.debug("getFromType: " + result);
LOG.debug("getFromType: {}", result);
assertNotNull(result, "getFromType result");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void testOnInstance() throws Exception {

final Parameters result = requestBodyAndHeaders("direct://ON_INSTANCE", null, headers);

LOG.debug("onInstance: " + result);
LOG.debug("onInstance: {}", result);
assertNotNull(result, "onInstance result");
Bundle bundle = (Bundle) result.getParameter().get(0).getResource();
assertNotNull(bundle, "onInstance result");
Expand All @@ -106,7 +106,7 @@ public void testOnInstanceVersion() throws Exception {

final Parameters result = requestBodyAndHeaders("direct://ON_INSTANCE_VERSION", null, headers);

LOG.debug("onInstance: " + result);
LOG.debug("onInstance: {}", result);
assertNotNull(result, "onInstance result");
Bundle bundle = (Bundle) result.getParameter().get(0).getResource();
assertNotNull(bundle, "onInstance result");
Expand Down Expand Up @@ -153,7 +153,7 @@ public void testOnType() throws Exception {
final org.hl7.fhir.instance.model.api.IBaseResource result = requestBodyAndHeaders("direct://ON_TYPE", null, headers);

assertNotNull(result, "onType result");
LOG.debug("onType: " + result);
LOG.debug("onType: {}", result);
}

@Disabled("Not implemented yet in HAPI FHIR server side, see"
Expand All @@ -175,7 +175,7 @@ public void testProcessMessage() throws Exception {
= requestBodyAndHeaders("direct://PROCESS_MESSAGE", null, headers);

assertNotNull(result, "processMessage result");
LOG.debug("processMessage: " + result);
LOG.debug("processMessage: {}", result);
}

@Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void testPatchByUrl() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://PATCH_BY_URL", null, headers);

assertNotNull(result, "patchByUrl result");
LOG.debug("patchByUrl: " + result);
LOG.debug("patchByUrl: {}", result);
assertActive(result);
}

Expand Down Expand Up @@ -153,7 +153,7 @@ public void configure() {
}

private void assertActive(MethodOutcome result) {
LOG.debug("result: " + result);
LOG.debug("result: {}", result);
IIdType id = result.getId();

Patient patient = fhirClient.read().resource(Patient.class).withId(id).preferResponseType(Patient.class).execute();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public void testResourceByUrlAndStringResourcePrettyPrint() throws Exception {
}

private void assertValidResponse(Patient result) {
LOG.debug("response: " + result);
LOG.debug("response: {}", result);
assertNotNull(result, "resourceByUrl result");
assertEquals("Freeman", result.getName().get(0).getFamily());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testSearchByUrl() throws Exception {
String url = "Patient?given=Vincent&family=Freeman&_format=json";
Bundle result = requestBody("direct://SEARCH_BY_URL", url);

LOG.debug("searchByUrl: " + result);
LOG.debug("searchByUrl: {}", result);
assertNotNull(result, "searchByUrl result");
Patient patient = (Patient) result.getEntry().get(0).getResource();
assertNotNull(patient);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void testWithBundle() throws Exception {

assertNotNull(result, "withBundle result");
assertTrue(result.getEntry().get(0).getResponse().getStatus().contains("Created"));
LOG.debug("withBundle: " + result);
LOG.debug("withBundle: {}", result);
}

@Test
Expand All @@ -84,7 +84,7 @@ public void testWithStringBundle() throws Exception {

assertNotNull(result, "withBundle result");
assertTrue(result.contains("Bundle"));
LOG.debug("withBundle: " + result);
LOG.debug("withBundle: {}", result);
}

@Test
Expand All @@ -99,7 +99,7 @@ public void testWithResources() throws Exception {
List<IBaseResource> result = requestBody("direct://WITH_RESOURCES", patients);

assertNotNull(result, "withResources result");
LOG.debug("withResources: " + result);
LOG.debug("withResources: {}", result);
assertEquals(2, result.size());
}

Expand All @@ -117,7 +117,7 @@ public void testWithResourcesSummaryEnum() throws Exception {
List<IBaseResource> result = requestBodyAndHeaders("direct://WITH_RESOURCES", patients, headers);

assertNotNull(result, "withResources result");
LOG.debug("withResources: " + result);
LOG.debug("withResources: {}", result);
assertEquals(2, result.size());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testResource() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE", null, headers);

assertNotNull(result, "resource result");
LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertEquals(date, ((Patient) result.getResource()).getBirthDate(), "Birth date not updated!");
}

Expand All @@ -95,7 +95,7 @@ public void testResourceNoId() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE", null, headers);

assertNotNull(result, "resource result");
LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertEquals(date, ((Patient) result.getResource()).getBirthDate(), "Birth date not updated!");
}

Expand All @@ -115,7 +115,7 @@ public void testResourceStringId() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_WITH_STRING_ID", null, headers);

assertNotNull(result, "resource result");
LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertEquals(date, ((Patient) result.getResource()).getBirthDate(), "Birth date not updated!");
}

Expand All @@ -135,7 +135,7 @@ public void testResourceAsString() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_AS_STRING", null, headers);

assertNotNull(result, "resource result");
LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertEquals(date, ((Patient) result.getResource()).getBirthDate(), "Birth date not updated!");
}

Expand All @@ -155,7 +155,7 @@ public void testResourceAsStringWithStringId() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_AS_STRING_WITH_STRING_ID", null, headers);

assertNotNull(result, "resource result");
LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertEquals(date, ((Patient) result.getResource()).getBirthDate(), "Birth date not updated!");
}

Expand All @@ -176,7 +176,7 @@ public void testResourceBySearchUrl() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_BY_SEARCH_URL", null, headers);

assertNotNull(result, "resource result");
LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertEquals(date, ((Patient) result.getResource()).getBirthDate(), "Birth date not updated!");
}

Expand All @@ -197,7 +197,7 @@ public void testResourceBySearchUrlAndResourceAsString() throws Exception {
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_BY_SEARCH_URL_AND_RESOURCE_AS_STRING", null, headers);

assertNotNull(result, "resource result");
LOG.debug("resource: " + result);
LOG.debug("resource: {}", result);
assertEquals(date, ((Patient) result.getResource()).getBirthDate(), "Birth date not updated!");
}

Expand Down
Loading