Author: davsclaus
Date: Mon Sep 24 07:44:30 2012
New Revision: 1389236
URL: http://svn.apache.org/viewvc?rev=1389236&view=rev
Log:
Fixed test after change in hl7 in Camel 2.11
Modified:
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java
Modified:
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java?rev=1389236&r1=1389235&r2=1389236&view=diff
==============================================================================
---
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java
(original)
+++
camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/hl7/HL7DataFormatTest.java
Mon Sep 24 07:44:30 2012
@@ -34,30 +34,12 @@ import static org.ops4j.pax.exam.OptionU
public class HL7DataFormatTest extends OSGiIntegrationTestSupport {
@Test
- public void testUnmarshalFailed() throws Exception {
- MockEndpoint mock = getMockEndpoint("mock:unmarshal");
- mock.expectedMessageCount(0);
-
- String body = createHL7AsString();
- try {
- template.sendBody("direct:unmarshalFailed", body);
- fail("Should have thrown exception");
- } catch (CamelExecutionException e) {
- assertIsInstanceOf(HL7Exception.class, e.getCause());
- assertIsInstanceOf(DataTypeException.class, e.getCause());
- assertTrue("Should be a validation error message",
e.getCause().getMessage().startsWith("Failed validation rule"));
- }
-
- assertMockEndpointsSatisfied();
- }
-
- @Test
- public void testUnmarshalOk() throws Exception {
+ public void testUnmarshal() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:unmarshal");
mock.expectedMessageCount(1);
String body = createHL7AsString();
- template.sendBody("direct:unmarshalOk", body);
+ template.sendBody("direct:unmarshal", body);
assertMockEndpointsSatisfied();
}
@@ -65,9 +47,7 @@ public class HL7DataFormatTest extends O
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
-
from("direct:unmarshalFailed").unmarshal().hl7().to("mock:unmarshal");
-
-
from("direct:unmarshalOk").unmarshal().hl7(false).to("mock:unmarshal");
+
from("direct:unmarshal").unmarshal().hl7().to("mock:unmarshal");
}
};
}