camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/9] camel git commit: Added unit test
Date Sun, 24 Jan 2016 11:50:36 GMT
Added unit test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1e5e1746
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1e5e1746
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1e5e1746

Branch: refs/heads/master
Commit: 1e5e174645955c35486312e60e9432a2f2835cbd
Parents: d53e31d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jan 24 12:45:25 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jan 24 12:45:25 2016 +0100

----------------------------------------------------------------------
 .../camel/component/hl7/HL7MLLPNettyRouteToTest.java    | 12 ++----------
 .../camel-hl7/src/test/resources/log4j.properties       |  2 +-
 2 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1e5e1746/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPNettyRouteToTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPNettyRouteToTest.java
b/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPNettyRouteToTest.java
index 642fdee..dca6eb7 100644
--- a/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPNettyRouteToTest.java
+++ b/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/HL7MLLPNettyRouteToTest.java
@@ -55,18 +55,10 @@ public class HL7MLLPNettyRouteToTest extends HL7TestSupport {
             public void configure() throws Exception {
                 from("direct:start")
                     .to("netty4:tcp://127.0.0.1:" + getPort() + "?sync=true&decoder=#hl7decoder&encoder=#hl7encoder")
-                    .process(new Processor() {
-                        @Override
-                        public void process(Exchange exchange) throws Exception {
-                            String body = exchange.getIn().getBody(String.class);
-                            System.out.println(body);
-                            log.info(body);
-                        }
-                    })
-                    .log("I was here ${body}")
+                    // because HL7 message contains a bunch of control chars then the logger
do not log all of the data
+                    .log("HL7 message: ${body}")
                     .to("mock:result");
 
-
                 from("netty4:tcp://127.0.0.1:" + getPort() + "?sync=true&decoder=#hl7decoder&encoder=#hl7encoder")
                     .process(new Processor() {
                         public void process(Exchange exchange) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/1e5e1746/components/camel-hl7/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-hl7/src/test/resources/log4j.properties b/components/camel-hl7/src/test/resources/log4j.properties
index e7a6576..a04cbb0 100644
--- a/components/camel-hl7/src/test/resources/log4j.properties
+++ b/components/camel-hl7/src/test/resources/log4j.properties
@@ -18,7 +18,7 @@
 #
 # The logging properties used for testing.
 #
-log4j.rootLogger=INFO, out
+log4j.rootLogger=INFO, file
 
 # uncomment the following to enable camel debugging
 #log4j.logger.org.apache.camel.component.hl7=DEBUG


Mime
View raw message