You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/02/13 03:52:41 UTC
svn commit: r743962 - in /camel/branches/camel-1.x: ./
camel-core/src/test/java/org/apache/camel/processor/
components/camel-jetty/src/test/java/org/apache/camel/component/jetty/
components/camel-spring/src/test/resources/org/apache/camel/spring/proces...
Author: ningjiang
Date: Fri Feb 13 02:52:40 2009
New Revision: 743962
URL: http://svn.apache.org/viewvc?rev=743962&view=rev
Log:
Merged revisions 743773,743920 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r743773 | ningjiang | 2009-02-12 22:59:47 +0800 (Thu, 12 Feb 2009) | 1 line
Updated the choice unit test
........
r743920 | janstey | 2009-02-13 07:05:08 +0800 (Fri, 13 Feb 2009) | 1 line
Add test case for using stream message, XPath, and choice()
........
Added:
camel/branches/camel-1.x/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyWithXPathChoiceTest.java
- copied unchanged from r743920, camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettyWithXPathChoiceTest.java
Modified:
camel/branches/camel-1.x/ (props changed)
camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/choice.xml
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 13 02:52:40 2009
@@ -1 +1 @@
-/camel/trunk:739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742854,742856,742898,742906,743613,743762
+/camel/trunk:739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742854,742856,742898,742906,743613,743762,743773,743920
Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java?rev=743962&r1=743961&r2=743962&view=diff
==============================================================================
--- camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java (original)
+++ camel/branches/camel-1.x/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java Fri Feb 13 02:52:40 2009
@@ -28,10 +28,12 @@
protected MockEndpoint x;
protected MockEndpoint y;
protected MockEndpoint z;
+ protected MockEndpoint end;
public void testSendToFirstWhen() throws Exception {
String body = "<one/>";
x.expectedBodiesReceived(body);
+ end.expectedBodiesReceived(body);
// The SpringChoiceTest.java can't setup the header by Spring configure file
// x.expectedHeaderReceived("name", "a");
expectsMessageCount(0, y, z);
@@ -44,6 +46,7 @@
public void testSendToSecondWhen() throws Exception {
String body = "<two/>";
y.expectedBodiesReceived(body);
+ end.expectedBodiesReceived(body);
expectsMessageCount(0, x, z);
sendMessage("cheese", body);
@@ -54,6 +57,7 @@
public void testSendToOtherwiseClause() throws Exception {
String body = "<three/>";
z.expectedBodiesReceived(body);
+ end.expectedBodiesReceived(body);
expectsMessageCount(0, x, y);
sendMessage("somethingUndefined", body);
@@ -72,6 +76,7 @@
x = getMockEndpoint("mock:x");
y = getMockEndpoint("mock:y");
z = getMockEndpoint("mock:z");
+ end = getMockEndpoint("mock:end");
}
protected RouteBuilder createRouteBuilder() {
@@ -80,7 +85,7 @@
from("direct:start").choice()
.when().xpath("$foo = 'bar'").to("mock:x")
.when().xpath("$foo = 'cheese'").to("mock:y")
- .otherwise().to("mock:z");
+ .otherwise().to("mock:z").end().to("mock:end");
}
};
}
Modified: camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/choice.xml
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/choice.xml?rev=743962&r1=743961&r2=743962&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/choice.xml (original)
+++ camel/branches/camel-1.x/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/choice.xml Fri Feb 13 02:52:40 2009
@@ -39,6 +39,7 @@
<to uri="mock:z"/>
</otherwise>
</choice>
+ <to uri="mock:end"/>
</route>
</camelContext>
<!-- END SNIPPET: example -->