Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PipelineDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PipelineDSLTest.java?rev=803128&r1=803127&r2=803128&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PipelineDSLTest.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PipelineDSLTest.java Tue Aug 11 13:59:36 2009 @@ -23,8 +23,8 @@ public class PipelineDSLTest extends GroovyRendererTestSupport { public void testPipeline1() throws Exception { - String DSL = "from(\"direct:start\").pipeline(\"direct:x\", \"direct:y\", \"direct:z\", \"mock:result\")"; - String expectedDSL = "from(\"direct:start\").to(\"direct:x\").to(\"direct:y\").to(\"direct:z\").to(\"mock:result\")"; + String DSL = "from(\"direct:start\").pipeline(\"mock:x\", \"mock:y\", \"mock:z\", \"mock:result\")"; + String expectedDSL = "from(\"direct:start\").to(\"mock:x\").to(\"mock:y\").to(\"mock:z\").to(\"mock:result\")"; assertEquals(expectedDSL, render(DSL)); }
Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,150 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +import static org.apache.camel.builder.Builder.constant; +import static org.apache.camel.builder.PredicateBuilder.in; +import org.apache.camel.Predicate; +import org.apache.camel.builder.PredicateBuilder; +import org.apache.camel.web.util.PredicateRenderer; + +/** + * + */ +public class PredicateRendererTest extends PredicateRendererTestSupport { + + public void testNot() throws Exception { + String expectedPredicate = "not(header(\"name\").isEqualTo(\"Claus\"))"; + Predicate predicate = not(header("name").isEqualTo(constant("Claus"))); + assertMatch(expectedPredicate, predicate); + } + + public void testAnd() throws Exception { + String expectedPredicate = "and(header(\"name\").isEqualTo(\"James\"), header(\"size\").isGreaterThanOrEqualTo(10))"; + Predicate p1 = header("name").isEqualTo(constant("James")); + Predicate p2 = header("size").isGreaterThanOrEqualTo(constant(10)); + Predicate and = PredicateBuilder.and(p1, p2); + assertMatch(expectedPredicate, and); + } + + public void testOr() throws Exception { + String expectedPredicate = "or(header(\"name\").isEqualTo(\"Hiram\"), header(\"size\").isGreaterThanOrEqualTo(10))"; + Predicate p1 = header("name").isEqualTo(constant("Hiram")); + Predicate p2 = header("size").isGreaterThanOrEqualTo(constant(10)); + Predicate or = PredicateBuilder.or(p1, p2); + assertMatch(expectedPredicate, or); + } + + public void testPredicateIn() throws Exception { + String expectedPredicate = "in(header(\"name\").isEqualTo(\"Hiram\"), header(\"name\").isEqualTo(\"James\"))"; + Predicate predicate = in(header("name").isEqualTo("Hiram"), header("name").isEqualTo("James")); + assertMatch(expectedPredicate, predicate); + } + + public void testValueIn() throws Exception { + String expectedPredicate = "header(\"name\").in(\"Hiram\", \"Jonathan\", \"James\", \"Claus\")"; + Predicate predicate = header("name").in("Hiram", "Jonathan", "James", "Claus"); + assertMatch(expectedPredicate, predicate); + } + + public void testIsEqualToString() throws Exception { + String expectedPredicate = "header(\"name\").isEqualTo(\"James\")"; + Predicate predicate = header("name").isEqualTo(constant("James")); + assertMatch(expectedPredicate, predicate); + + } + + public void testIsEqualToConstant() throws Exception { + String expectedPredicate = "header(\"name\").isEqualTo(100)"; + Predicate predicate = header("name").isEqualTo(constant(100)); + assertMatch(expectedPredicate, predicate); + } + + public void testIsNotEqualTo() throws Exception { + String expectedPredicate = "header(\"name\").isNotEqualTo(\"James\")"; + Predicate predicate = header("name").isNotEqualTo(constant("James")); + assertMatch(expectedPredicate, predicate); + } + + public void testIsLessThan() throws Exception { + String expectedPredicate = "header(\"name\").isLessThan(\"James\")"; + Predicate predicate = header("name").isLessThan(constant("James")); + assertMatch(expectedPredicate, predicate); + } + + public void testIsLessThanOrEqualTo() throws Exception { + String expectedPredicate = "header(\"name\").isLessThanOrEqualTo(\"James\")"; + Predicate predicate = header("name").isLessThanOrEqualTo(constant("James")); + assertMatch(expectedPredicate, predicate); + } + + public void testIsGreaterThan() throws Exception { + String expectedPredicate = "header(\"name\").isGreaterThan(\"James\")"; + Predicate predicate = header("name").isGreaterThan(constant("James")); + assertMatch(expectedPredicate, predicate); + } + + public void testIsGreaterThanOrEqualTo() throws Exception { + String expectedPredicate = "header(\"name\").isGreaterThanOrEqualTo(\"James\")"; + Predicate predicate = header("name").isGreaterThanOrEqualTo(constant("James")); + assertMatch(expectedPredicate, predicate); + } + + public void testContains() throws Exception { + String expectedPredicate = "header(\"name\").contains(\"James\")"; + Predicate predicate = header("name").contains(constant("James")); + assertMatch(expectedPredicate, predicate); + } + + public void testIsNull() throws Exception { + String expectedPredicate = "header(\"name\").isNull()"; + Predicate predicate = header("name").isNull(); + assertMatch(expectedPredicate, predicate); + } + + public void testIsNotNull() throws Exception { + String expectedPredicate = "header(\"name\").isNotNull()"; + Predicate predicate = header("name").isNotNull(); + assertMatch(expectedPredicate, predicate); + } + + public void _testIsInstanceOf() throws Exception { + String expectedPredicate = "header(\"name\").isNull()"; + Predicate predicate = header("name").isNull(); + assertMatch(expectedPredicate, predicate); + } + + public void testStartsWith() throws Exception { + String expectedPredicate = "header(\"name\").startsWith(\"James\")"; + Predicate predicate = header("name").startsWith("James"); + assertMatch(expectedPredicate, predicate); + } + + public void testEndsWith() throws Exception { + String expectedPredicate = "header(\"name\").endsWith(\"James\")"; + Predicate predicate = header("name").endsWith("James"); + assertMatch(expectedPredicate, predicate); + } + + public void testRegex() throws Exception { + String expectedPredicate = "header(\"name\").regex(\"[a-zA-Z]+,London,UK\")"; + Predicate predicate = header("name").regex("[a-zA-Z]+,London,UK"); + assertMatch(expectedPredicate, predicate); + } + +} Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTestSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTestSupport.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTestSupport.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/PredicateRendererTestSupport.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,63 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +import junit.framework.TestCase; +import org.apache.camel.Predicate; +import org.apache.camel.builder.Builder; +import org.apache.camel.builder.PredicateBuilder; +import org.apache.camel.builder.ValueBuilder; +import org.apache.camel.web.util.PredicateRenderer; + +/** + * + */ +public class PredicateRendererTestSupport extends TestCase { + + protected static ValueBuilder body() { + return Builder.body(); + } + + protected static ValueBuilder constant(Object value) { + return Builder.constant(value); + } + + protected static ValueBuilder header(String name) { + return Builder.header(name); + } + + protected static Predicate not(Predicate predicate) { + return PredicateBuilder.not(predicate); + } + + protected static Predicate and(Predicate p1, Predicate p2) { + return PredicateBuilder.and(p1, p2); + } + + protected static Predicate or(Predicate p1, Predicate p2) { + return PredicateBuilder.or(p1, p2); + } + + protected void assertMatch(String expectedPredicate, Predicate predicate) throws Exception { + StringBuilder sb = new StringBuilder(); + PredicateRenderer.render(sb, predicate); + + assertEquals(expectedPredicate, sb.toString()); + } + +} Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/ResequenceDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/ResequenceDSLTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/ResequenceDSLTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/ResequenceDSLTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,38 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +/** + * + */ +public class ResequenceDSLTest extends GroovyRendererTestSupport { + + public void testResequence() throws Exception { + String DSL = "from(\"direct:start\").resequence(body()).to(\"mock:result\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } + + public void testResequencer() throws Exception { + String DSL = "from(\"direct:start\").resequencer(header(\"seqnum\")).stream().to(\"mock:result\")"; + String expectedDSL = "from(\"direct:start\").resequence(header(\"seqnum\")).stream().to(\"mock:result\")"; + + assertEquals(expectedDSL, render(DSL)); + } +} Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/RollbackDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/RollbackDSLTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/RollbackDSLTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/RollbackDSLTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,31 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +/** + * + */ +public class RollbackDSLTest extends GroovyRendererTestSupport { + + public void testRollback() throws Exception { + String DSL = "from(\"direct:start\").choice().when(body().isNotEqualTo(\"ok\")).to(\"mock:rollback\").rollback(\"That do not work\").otherwise().to(\"mock:result\").end()"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } +} Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SortDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SortDSLTest.java?rev=803128&r1=803127&r2=803128&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SortDSLTest.java (original) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SortDSLTest.java Tue Aug 11 13:59:36 2009 @@ -22,7 +22,7 @@ */ public class SortDSLTest extends GroovyRendererTestSupport { - public void testRecipientList() throws Exception { + public void testSort() throws Exception { String DSL = "from(\"direct:start\").sort(body().tokenize(\",\")).to(\"bean:MyServiceBean.processLine\")"; String expectedDSL = DSL; Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SplitDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SplitDSLTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SplitDSLTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/SplitDSLTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,53 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +/** + * + */ +public class SplitDSLTest extends GroovyRendererTestSupport { + + public void testSplitStream() throws Exception { + String DSL = "from(\"direct:start\").split(body().tokenize(\",\")).streaming().to(\"mock:result\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } + + public void testSplitTokenize() throws Exception { + String DSL = "from(\"direct:start\").split(body(String.class).tokenize(\",\")).to(\"mock:result\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } + + public void testSplitMethod() throws Exception { + String DSL = "from(\"direct:start\").split().method(\"mySplitterBean\", \"splitBody\").to(\"mock:result\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } + + public void _testSplitXPath() throws Exception { + String DSL = "from(\"direct:start\").split(xpath(\"//foo/bar\")).convertBodyTo(String.class).to(\"mock:result\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } + +} Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StopDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StopDSLTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StopDSLTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StopDSLTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +/** + * + */ +public class StopDSLTest extends GroovyRendererTestSupport { + + public void testStop() throws Exception { + String DSL = "from(\"direct:start\").choice().when(body().contains(\"Hello\")).to(\"mock:hello\").when(body().contains(\"Bye\")).to(\"mock:bye\").stop()" + + ".otherwise().to(\"mock:other\").end().to(\"mock:result\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } +} Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StreamCachingDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StreamCachingDSLTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StreamCachingDSLTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/StreamCachingDSLTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +/** + * + */ +public class StreamCachingDSLTest extends GroovyRendererTestSupport { + + public void test() throws Exception { + String DSL = "from(\"direct:start\").streamCaching().to(\"mock:result\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, render(DSL)); + } + +} Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TracingDSLTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TracingDSLTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TracingDSLTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/groovy/TracingDSLTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,31 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.groovy; + +/** + * + */ +public class TracingDSLTest extends GroovyRendererTestSupport { + + public void testTracePerRotueManual() throws Exception { + String DSL = "from(\"direct:a\").tracing().streamCaching().to(\"mock:a\");from(\"direct:b\").noTracing().to(\"mock:b\");from(\"direct:c\").tracing().to(\"mock:c\")"; + String expectedDSL = DSL; + + assertEquals(expectedDSL, renderRoutes(DSL)); + } +} Added: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/util/UriCharachersEncoderTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/util/UriCharachersEncoderTest.java?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/util/UriCharachersEncoderTest.java (added) +++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/util/UriCharachersEncoderTest.java Tue Aug 11 13:59:36 2009 @@ -0,0 +1,40 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.camel.web.util; + +import junit.framework.TestCase; + +/** + * + */ +public class UriCharachersEncoderTest extends TestCase { + public void testEncoder() { + String afterEncoding = "direct:%2F%2Fstart"; + String beforeEncoding = "direct://start"; + + String result = UriCharactersEncoder.encode(beforeEncoding); + assertEquals("Get the wrong encoding result", afterEncoding, result); + } + + public void testNoEncoding() { + String noEncoding = "direct:start"; + String result = UriCharactersEncoder.encode(noEncoding); + assertEquals("Get the wrong encoding result", noEncoding, result); + } + +} Modified: camel/trunk/components/camel-web/src/test/resources/route.txt URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/resources/route.txt?rev=803128&r1=803127&r2=803128&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/resources/route.txt (original) +++ camel/trunk/components/camel-web/src/test/resources/route.txt Tue Aug 11 13:59:36 2009 @@ -1 +1 @@ -onCompletion().to("log:global").to("mock:global");from("direct:start").onCompletion().to("log:route").to("mock:sync").end().to("mock:result") \ No newline at end of file +from("direct:start").to("mock:result") \ No newline at end of file Added: camel/trunk/components/camel-web/src/test/resources/routes.txt URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/resources/routes.txt?rev=803128&view=auto ============================================================================== --- camel/trunk/components/camel-web/src/test/resources/routes.txt (added) +++ camel/trunk/components/camel-web/src/test/resources/routes.txt Tue Aug 11 13:59:36 2009 @@ -0,0 +1 @@ +interceptFrom("seda:(bar|foo)").to("mock:intercept");from("direct:start").to("mock:result");from("seda:bar").to("mock:result");from("seda:foo").to("mock:result");from("seda:cheese").to("mock:result") \ No newline at end of file Modified: camel/trunk/components/camel-web/src/test/resources/testedRoutes.txt URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/resources/testedRoutes.txt?rev=803128&r1=803127&r2=803128&view=diff ============================================================================== --- camel/trunk/components/camel-web/src/test/resources/testedRoutes.txt (original) +++ camel/trunk/components/camel-web/src/test/resources/testedRoutes.txt Tue Aug 11 13:59:36 2009 @@ -35,7 +35,8 @@ from("direct:start").filter(body().contains("World")).to("mock:result") #########################loadBalance######################### from("direct:start").loadBalance().random().to("mock:x", "mock:y", "mock:z") -#from("direct:start").loadBalance().failover(IOException.class).to("direct:x", "direct:y") // No getExceptions method for FailOverLoadBalancer +from("direct:start").loadBalance().failover(IOException.class).to("mock:x", "mock:y", "mock:z") +from("direct:start").loadBalance().sticky(header("foo")).to("mock:x", "mock:y", "mock:z") #########################loop######################### from("direct:start").loop(8).to("mock:result") from("direct:start").loop(header("loop")).to("mock:result") @@ -49,7 +50,12 @@ #########################recipientList######################### from("direct:start").recipientList(header("recipientListHeader").tokenize(",")) #########################resequencer######################### +<<<<<<< .mine +from("direct:start").resequence(body()).to("mock:result") +from("direct:start").resequencer(header("seqnum")).stream().to("mock:result") +======= #from("direct:start").resequence(body()).to("mock:result") +>>>>>>> .r801852 #########################routingSlip######################### from("direct:start").routingSlip("headerName") from("direct:start").routingSlip("aRoutingSlipHeader", "#") @@ -60,9 +66,9 @@ from("direct:start").sort(body().tokenize(",")).to("bean:MyServiceBean.processLine") #from("direct:start").sort(body().tokenize("\n")).to("bean:MyServiceBean.processLine") #########################split######################### -#from("direct:start").split(body().tokenize(",")).streaming().to("mock:result") -#from("direct:start").split(body(String.class).tokenize("\n")).to("mock:result") -#from("direct:start").split().method("mySplitterBean", "splitBody").to("mock:result") +from("direct:start").split(body().tokenize(",")).streaming().to("mock:result") +from("direct:start").split(body(String.class).tokenize("\n")).to("mock:result") +from("direct:start").split().method("mySplitterBean", "splitBody").to("mock:result") #from("direct:start").split(xpath("//foo/bar")).convertBodyTo(String.class).to("mock:result") #########################throttle######################### from("direct:start").throttle(100).to("mock:result") @@ -72,7 +78,7 @@ from("direct:start").transform().constant("London").to("mock:result") from("direct:start").transform(body().append(" World!")).to("mock:result") from("direct:start").transform(sendTo("direct:foo")).to("mock:result") -#from("activemq:SomeQueue").beanRef("myTransformerBean", "myMethodName").to("mqseries:AnotherQueue") +#from("direct:start").beanRef("myTransformerBean", "myMethodName").to("mock:result") #########################validation######################### #########################xpath######################### from("direct:start").filter().xpath("/pers...@name='James']").to("mock:result") @@ -80,7 +86,7 @@ #########################wireTap######################### from("direct:start").to("log:foo").wireTap("direct:tap").to("mock:result") from("direct:start").delay(1000).setBody().constant("Tapped").to("mock:result", "mock:tap") -#from("direct:start").wireTap("direct:foo", constant("Bye World")).to("mock:result") +from("direct:start").wireTap("direct:foo", constant("Bye World")).to("mock:result") #########################others######################### from("direct:start").marshal().serialization().to("direct:marshalled") from("direct:start").unmarshal().serialization().to("mock:result") \ No newline at end of file
