camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r965438 - /camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithEncodingTest.java
Date Mon, 19 Jul 2010 11:42:44 GMT
Author: davsclaus
Date: Mon Jul 19 11:42:44 2010
New Revision: 965438

URL: http://svn.apache.org/viewvc?rev=965438&view=rev
Log:
CAMEL-2946: Fixed test due JAXB upgrade.

Modified:
    camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithEncodingTest.java

Modified: camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithEncodingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithEncodingTest.java?rev=965438&r1=965437&r2=965438&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithEncodingTest.java
(original)
+++ camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatWithEncodingTest.java
Mon Jul 19 11:42:44 2010
@@ -35,8 +35,11 @@ public class SpringDataFormatWithEncodin
         bean.setPrice(2.5);
 
         MockEndpoint mock = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
-        mock.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"iso-8859-1\" standalone=\"yes\"?>"
-                + "<purchaseOrder amount=\"23.0\" price=\"2.5\" name=\"Beer\"/>");
+        mock.message(0).body(String.class).startsWith("<?xml version=\"1.0\" encoding=\"iso-8859-1\"
standalone=\"yes\"?>");
+        mock.message(0).body(String.class).contains("purchaseOrder");
+        mock.message(0).body(String.class).contains("amount=\"23.0\"");
+        mock.message(0).body(String.class).contains("price=\"2.5\"");
+        mock.message(0).body(String.class).contains("name=\"Beer\"");
 
         template.sendBody("direct:start", bean);
 
@@ -51,8 +54,11 @@ public class SpringDataFormatWithEncodin
         bean.setPrice(2.5);
 
         MockEndpoint mock = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
-        mock.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>"
-                + "<purchaseOrder amount=\"23.0\" price=\"2.5\" name=\"Beer\"/>");
+        mock.message(0).body(String.class).startsWith("<?xml version=\"1.0\" encoding=\"utf-8\"
standalone=\"yes\"?>");
+        mock.message(0).body(String.class).contains("purchaseOrder");
+        mock.message(0).body(String.class).contains("amount=\"23.0\"");
+        mock.message(0).body(String.class).contains("price=\"2.5\"");
+        mock.message(0).body(String.class).contains("name=\"Beer\"");
 
         // the property should override the jaxb configuration
         template.sendBodyAndProperty("direct:start", bean, Exchange.CHARSET_NAME, "utf-8");



Mime
View raw message