This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit f1f0c69a83eafbd88f24526cc550869caa9cf9a8
Author: Claus Ibsen
AuthorDate: Tue Mar 6 13:13:17 2018 +0100
Fixed tests
---
.../component/fhir/FhirJsonDataFormatSpringTest.java | 13 ++---
.../camel/component/fhir/FhirJsonDataFormatTest.java | 15 ++-
.../camel/component/fhir/FhirXmlDataFormatSpringTest.java | 13 ++---
.../camel/component/fhir/FhirXmlDataFormatTest.java | 15 ++-
.../camel/component/fhir/Hl7v2PatientToFhirPatientIT.java | 8 +---
5 files changed, 45 insertions(+), 19 deletions(-)
diff --git
a/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatSpringTest.java
b/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatSpringTest.java
index 87575fe..e2a43f9 100644
---
a/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatSpringTest.java
+++
b/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatSpringTest.java
@@ -49,8 +49,12 @@ public class FhirJsonDataFormatSpringTest extends
CamelSpringTestSupport {
@Test
public void unmarshal() throws Exception {
-template.sendBody("direct:unmarshal", PATIENT);
mockEndpoint.expectedMessageCount(1);
+
+template.sendBody("direct:unmarshal", PATIENT);
+
+mockEndpoint.assertIsSatisfied();
+
Exchange exchange = mockEndpoint.getExchanges().get(0);
Patient patient = (Patient) exchange.getIn().getBody();
assertTrue("Patients should be equal!",
patient.equalsDeep(getPatient()));
@@ -58,10 +62,13 @@ public class FhirJsonDataFormatSpringTest extends
CamelSpringTestSupport {
@Test
public void marshal() throws Exception {
-Patient patient = getPatient();
mockEndpoint.expectedMessageCount(1);
+
+Patient patient = getPatient();
template.sendBody("direct:marshal", patient);
-mockEndpoint.expectedMessageCount(1);
+
+mockEndpoint.assertIsSatisfied();
+
Exchange exchange = mockEndpoint.getExchanges().get(0);
InputStream inputStream = exchange.getIn().getBody(InputStream.class);
IBaseResource iBaseResource =
FhirContext.forDstu3().newJsonParser().parseResource(new
InputStreamReader(inputStream));
diff --git
a/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatTest.java
b/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatTest.java
index 4bb538c..e2ca74d 100644
---
a/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatTest.java
+++
b/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirJsonDataFormatTest.java
@@ -48,8 +48,12 @@ public class FhirJsonDataFormatTest extends CamelTestSupport
{
@Test
public void unmarshal() throws Exception {
-template.sendBody("direct:unmarshal", PATIENT);
mockEndpoint.expectedMessageCount(1);
+
+template.sendBody("direct:unmarshal", PATIENT);
+
+mockEndpoint.assertIsSatisfied();
+
Exchange exchange = mockEndpoint.getExchanges().get(0);
Patient patient = (Patient) exchange.getIn().getBody();
assertTrue("Patients should be equal!",
patient.equalsDeep(getPatient()));
@@ -57,10 +61,13 @@ public class FhirJsonDataFormatTest extends
CamelTestSupport {
@Test
public void marshal() throws Exception {
-Patient patient = getPatient();
mockEndpoint.expectedMessageCount(1);
+
+Patient patient = getPatient();
template.sendBody("direct:marshal", patient);
-mockEndpoint.expectedMessageCount(1);
+
+mockEndpoint.assertIsSatisfied();
+
Exchange exchange = mockEndpoint.getExchanges().get(0);
InputStream inputStream = exchange.getIn().getBody(InputStream.class);
IBaseResource iBaseResource =
FhirContext.forDstu3().newJsonParser().parseResource(new
InputStreamReader(inputStream));
@@ -76,7 +83,6 @@ public class FhirJsonDataFormatTest extends CamelTestSupport {
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
-
from("direct:marshal")
.marshal().fhirJson("DSTU3")
.to("mock:result");
@@ -84,7 +90,6 @@ public class FhirJsonDataFormatTest extends CamelTestSupport {
from("direct:unmarshal")
.unmarshal().fhirJson()
.to("mock:result");
-
}
};
}
diff --git
a/components/camel-fhir/src/test/java/org/apache/camel/component/fhir/FhirXmlDataFormatSpringTest.java