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 2008/03/24 16:08:42 UTC
svn commit: r640438 [6/8] - in /activemq/camel/trunk:
camel-core/src/main/java/org/apache/camel/
camel-core/src/main/java/org/apache/camel/builder/
camel-core/src/main/java/org/apache/camel/builder/xml/
camel-core/src/main/java/org/apache/camel/compone...
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java Mon Mar 24 08:08:24 2008
@@ -44,7 +44,7 @@
/**
* A default JNDI context
- *
+ *
* @version $Revision$ $Date$
*/
public class JndiContext implements Context, Serializable {
@@ -56,7 +56,7 @@
};
protected static final Injector INJETOR = new ReflectionInjector();
private static final long serialVersionUID = -5754338187296859149L;
-
+
private final Hashtable environment; // environment for this context
private final Map bindings; // bindings at my level
private final Map treeBindings; // all bindings under me
@@ -96,7 +96,7 @@
this(clone, env);
this.nameInNamespace = nameInNamespace;
}
-
+
/**
* A helper method to create the JNDI bindings from the input environment
* properties using $foo.class to point to a class name with $foo.* being
@@ -146,7 +146,7 @@
* from the next context, plus the context it just created (if it in fact
* created it). (the names are suitably extended by the segment originally
* lopped off).
- *
+ *
* @param name
* @param value
* @return
@@ -194,8 +194,7 @@
protected JndiContext newContext() {
try {
return new JndiContext();
- }
- catch (Exception e) {
+ } catch (Exception e) {
throw new IllegalArgumentException(e);
}
}
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/GraphGeneratorSupport.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,25 +16,25 @@
*/
package org.apache.camel.view;
-import java.io.IOException;
import java.io.File;
-import java.io.PrintWriter;
import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.HashMap;
-import java.util.ArrayList;
import org.apache.camel.CamelContext;
-import org.apache.camel.util.CollectionStringBuffer;
-import org.apache.camel.model.RouteType;
-import org.apache.camel.model.ProcessorType;
-import org.apache.camel.model.MulticastType;
import org.apache.camel.model.ChoiceType;
import org.apache.camel.model.FromType;
+import org.apache.camel.model.MulticastType;
+import org.apache.camel.model.ProcessorType;
+import org.apache.camel.model.RouteType;
import org.apache.camel.model.ToType;
import org.apache.camel.model.language.ExpressionType;
+import org.apache.camel.util.CollectionStringBuffer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -45,13 +44,14 @@
public abstract class GraphGeneratorSupport {
private static final transient Log LOG = LogFactory.getLog(RouteDotGenerator.class);
protected String dir;
+ protected int clusterCounter;
+ protected String extension;
+
//private String imagePrefix = "http://www.enterpriseintegrationpatterns.com/img/";
private String imagePrefix = "http://activemq.apache.org/camel/images/eip/";
private Map<Object, NodeData> nodeMap = new HashMap<Object, NodeData>();
private boolean makeParentDirs = true;
- protected int clusterCounter;
private Map<String, List<RouteType>> routeGroupMap;
- protected String extension;
protected GraphGeneratorSupport(String dir, String extension) {
this.dir = dir;
@@ -101,8 +101,7 @@
PrintWriter writer = new PrintWriter(new FileWriter(new File(parent, fileName)));
try {
generateFile(writer, map);
- }
- finally {
+ } finally {
writer.close();
}
}
@@ -131,11 +130,10 @@
protected NodeData getNodeData(Object node) {
Object key = node;
if (node instanceof FromType) {
- FromType fromType = (FromType) node;
+ FromType fromType = (FromType)node;
key = fromType.getUriOrRef();
- }
- else if (node instanceof ToType) {
- ToType toType = (ToType) node;
+ } else if (node instanceof ToType) {
+ ToType toType = (ToType)node;
key = toType.getUriOrRef();
}
NodeData answer = nodeMap.get(key);
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,10 +16,23 @@
*/
package org.apache.camel.view;
+
import java.util.ArrayList;
import java.util.List;
-import org.apache.camel.model.*;
+
+import org.apache.camel.model.AggregatorType;
+import org.apache.camel.model.ChoiceType;
+import org.apache.camel.model.FilterType;
+import org.apache.camel.model.FromType;
+import org.apache.camel.model.OtherwiseType;
+import org.apache.camel.model.ProcessorType;
+import org.apache.camel.model.RecipientListType;
+import org.apache.camel.model.ResequencerType;
+import org.apache.camel.model.SplitterType;
+import org.apache.camel.model.ToType;
+import org.apache.camel.model.WhenType;
+
import static org.apache.camel.util.ObjectHelper.isNotNullAndNonEmpty;
import static org.apache.camel.util.ObjectHelper.isNullOrBlank;
@@ -31,7 +43,6 @@
*/
public class NodeData {
public String id;
- private final String imagePrefix;
public String image;
public String label;
public String shape;
@@ -42,67 +53,59 @@
public String url;
public List<ProcessorType> outputs;
public String association = "property";
+ private final String imagePrefix;
public NodeData(String id, Object node, String imagePrefix) {
this.id = id;
this.imagePrefix = imagePrefix;
if (node instanceof ProcessorType) {
- ProcessorType processorType = (ProcessorType) node;
+ ProcessorType processorType = (ProcessorType)node;
this.edgeLabel = processorType.getLabel();
}
if (node instanceof FromType) {
- FromType fromType = (FromType) node;
+ FromType fromType = (FromType)node;
this.tooltop = fromType.getLabel();
this.label = removeQueryString(this.tooltop);
this.url = "http://activemq.apache.org/camel/message-endpoint.html";
- }
- else if (node instanceof ToType) {
- ToType toType = (ToType) node;
+ } else if (node instanceof ToType) {
+ ToType toType = (ToType)node;
this.tooltop = toType.getLabel();
this.label = removeQueryString(this.tooltop);
this.edgeLabel = "";
this.url = "http://activemq.apache.org/camel/message-endpoint.html";
- }
- else if (node instanceof FilterType) {
+ } else if (node instanceof FilterType) {
this.image = imagePrefix + "MessageFilterIcon.png";
this.nodeType = "Message Filter";
- }
- else if (node instanceof WhenType) {
+ } else if (node instanceof WhenType) {
this.image = imagePrefix + "MessageFilterIcon.png";
this.nodeType = "When Filter";
this.url = "http://activemq.apache.org/camel/content-based-router.html";
- }
- else if (node instanceof OtherwiseType) {
+ } else if (node instanceof OtherwiseType) {
this.nodeType = "Otherwise";
this.edgeLabel = "";
this.url = "http://activemq.apache.org/camel/content-based-router.html";
this.tooltop = "Otherwise";
- }
- else if (node instanceof ChoiceType) {
+ } else if (node instanceof ChoiceType) {
this.image = imagePrefix + "ContentBasedRouterIcon.png";
this.nodeType = "Content Based Router";
this.label = "";
this.edgeLabel = "";
- ChoiceType choice = (ChoiceType) node;
+ ChoiceType choice = (ChoiceType)node;
List<ProcessorType> outputs = new ArrayList<ProcessorType>(choice.getWhenClauses());
outputs.add(choice.getOtherwise());
this.outputs = outputs;
- }
- else if (node instanceof RecipientListType) {
+ } else if (node instanceof RecipientListType) {
this.image = imagePrefix + "RecipientListIcon.png";
this.nodeType = "Recipient List";
- }
- else if (node instanceof SplitterType) {
+ } else if (node instanceof SplitterType) {
this.image = imagePrefix + "SplitterIcon.png";
this.nodeType = "Splitter";
- }
- else if (node instanceof AggregatorType) {
+ } else if (node instanceof AggregatorType) {
this.image = imagePrefix + "AggregatorIcon.png";
this.nodeType = "Aggregator";
- }
- else if (node instanceof ResequencerType) {
+ } else if (node instanceof ResequencerType) {
this.image = imagePrefix + "ResequencerIcon.png";
this.nodeType = "Resequencer";
}
@@ -124,11 +127,9 @@
if (isNullOrBlank(this.image)) {
this.label = this.nodeType;
this.shape = "box";
- }
- else if (isNotNullAndNonEmpty(this.edgeLabel)) {
+ } else if (isNotNullAndNonEmpty(this.edgeLabel)) {
this.label = "";
- }
- else {
+ } else {
this.label = node.toString();
}
}
@@ -136,16 +137,16 @@
if (isNotNullAndNonEmpty(this.nodeType)) {
String description = isNotNullAndNonEmpty(this.edgeLabel) ? this.edgeLabel : this.label;
this.tooltop = this.nodeType + ": " + description;
- }
- else {
+ } else {
this.tooltop = this.label;
}
}
if (isNullOrBlank(this.url) && isNotNullAndNonEmpty(this.nodeType)) {
- this.url = "http://activemq.apache.org/camel/" + this.nodeType.toLowerCase().replace(' ', '-') + ".html";
+ this.url = "http://activemq.apache.org/camel/" + this.nodeType.toLowerCase().replace(' ', '-')
+ + ".html";
}
if (node instanceof ProcessorType && this.outputs == null) {
- ProcessorType processorType = (ProcessorType) node;
+ ProcessorType processorType = (ProcessorType)node;
this.outputs = processorType.getOutputs();
}
}
@@ -154,8 +155,7 @@
int idx = text.indexOf("?");
if (idx <= 0) {
return text;
- }
- else {
+ } else {
return text.substring(0, idx);
}
}
@@ -169,15 +169,15 @@
public static String insertSpacesBetweenCamelCase(String name) {
boolean lastCharacterLowerCase = false;
StringBuffer buffer = new StringBuffer();
- for (int i = 0, size = name.length(); i < size; i++) {
+ int i = 0;
+ for (int size = name.length(); i < size; i++) {
char ch = name.charAt(i);
if (Character.isUpperCase(ch)) {
if (lastCharacterLowerCase) {
buffer.append(' ');
}
lastCharacterLowerCase = false;
- }
- else {
+ } else {
lastCharacterLowerCase = true;
}
buffer.append(ch);
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/XmlGraphGenerator.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/XmlGraphGenerator.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/XmlGraphGenerator.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/view/XmlGraphGenerator.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -64,8 +63,8 @@
group = encode(group);
if (group != null) {
int idx = group.lastIndexOf('.');
- String name =group;
- if (idx > 0 && idx < group.length() -1 ) {
+ String name = group;
+ if (idx > 0 && idx < group.length() - 1) {
name = group.substring(idx + 1);
}
writer.println("<Node id='" + group + "' name='" + name + "' description='" + group + "' nodeType='group'/>");
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java Mon Mar 24 08:08:24 2008
@@ -16,7 +16,6 @@
*/
package org.apache.camel;
-import java.io.File;
import java.util.List;
import javax.naming.Context;
@@ -25,10 +24,9 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.processor.CreateRouteWithNonExistingEndpointTest;
import org.apache.camel.spi.Language;
-import org.apache.camel.util.jndi.JndiTest;
import org.apache.camel.util.CamelContextHelper;
+import org.apache.camel.util.jndi.JndiTest;
/**
* A useful base class which creates a {@link CamelContext} with some routes
@@ -76,8 +74,7 @@
log.debug("Using created route builder: " + builder);
context.addRoutes(builder);
}
- }
- else {
+ } else {
log.debug("Using route builder from the created context: " + context);
}
@@ -96,8 +93,7 @@
protected void stopCamelContext() throws Exception {
if (camelContextService != null) {
camelContextService.stop();
- }
- else {
+ } else {
context.stop();
}
}
@@ -105,15 +101,13 @@
protected void startCamelContext() throws Exception {
if (camelContextService != null) {
camelContextService.start();
- }
- else {
+ } else {
if (context instanceof DefaultCamelContext) {
- DefaultCamelContext defaultCamelContext = (DefaultCamelContext) context;
+ DefaultCamelContext defaultCamelContext = (DefaultCamelContext)context;
if (!defaultCamelContext.isStarted()) {
defaultCamelContext.start();
}
- }
- else {
+ } else {
context.start();
}
}
@@ -146,13 +140,13 @@
/**
* Factory method which derived classes can use to create an array of
* {@link RouteBuilder}s to define the routes for testing
- *
+ *
* @see #createRouteBuilder()
*/
protected RouteBuilder[] createRouteBuilders() throws Exception {
return new RouteBuilder[] {createRouteBuilder()};
}
-
+
/**
* Resolves a mandatory endpoint for the given URI or an exception is thrown
*
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangePatternTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangePatternTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangePatternTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangePatternTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/ExchangeTestSupport.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java Mon Mar 24 08:08:24 2008
@@ -16,16 +16,15 @@
*/
package org.apache.camel;
-import java.util.List;
import java.io.File;
+import java.util.List;
import junit.framework.TestCase;
-
import org.apache.camel.builder.Builder;
-import org.apache.camel.builder.ValueBuilder;
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.DefaultExchange;
+import org.apache.camel.builder.ValueBuilder;
import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.DefaultExchange;
import org.apache.camel.processor.DelegateAsyncProcessor;
import org.apache.camel.processor.DelegateProcessor;
import org.apache.camel.util.ExchangeHelper;
@@ -34,7 +33,7 @@
/**
* A bunch of useful testing methods
- *
+ *
* @version $Revision$
*/
public abstract class TestSupport extends TestCase {
@@ -163,8 +162,7 @@
if (expected == null) {
actual = ExchangeHelper.getMandatoryInBody(exchange);
assertEquals("in body of: " + exchange, expected, actual);
- }
- else {
+ } else {
actual = ExchangeHelper.getMandatoryInBody(exchange, expected.getClass());
}
assertEquals("in body of: " + exchange, expected, actual);
@@ -185,8 +183,7 @@
if (expected == null) {
actual = ExchangeHelper.getMandatoryOutBody(exchange);
assertEquals("output body of: " + exchange, expected, actual);
- }
- else {
+ } else {
actual = ExchangeHelper.getMandatoryOutBody(exchange, expected.getClass());
}
assertEquals("output body of: " + exchange, expected, actual);
@@ -324,15 +321,15 @@
/**
* If a processor is wrapped with a bunch of DelegateProcessor or DelegateAsyncProcessor objects
* this call will drill through them and return the wrapped Processor.
- *
+ *
* @param processor
* @return
*/
protected Processor unwrap(Processor processor) {
- while( true ) {
- if( processor instanceof DelegateAsyncProcessor ) {
+ while (true) {
+ if (processor instanceof DelegateAsyncProcessor) {
processor = ((DelegateAsyncProcessor)processor).getProcessor();
- } else if( processor instanceof DelegateProcessor ) {
+ } else if (processor instanceof DelegateProcessor) {
processor = ((DelegateProcessor)processor).getProcessor();
} else {
return processor;
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/BuilderWithScopesTest.java Mon Mar 24 08:08:24 2008
@@ -33,7 +33,7 @@
* @version $Revision$
*/
public class BuilderWithScopesTest extends TestSupport {
-
+
final ArrayList<String> order = new ArrayList<String>();
final DelegateProcessor interceptor1 = new DelegateProcessor() {
@Override
@@ -76,22 +76,19 @@
order.add("VALIDATE");
Object value = exchange.getIn().getHeader("foo");
if (value == null) {
- throw new IllegalArgumentException("The foo header is not present.");
+ throw new IllegalArgumentException("The foo header is not present.");
} else if (!value.equals("bar")) {
throw new ValidationException(exchange, "The foo header does not equal bar! Was: " + value);
}
}
};
-
- protected void runTest(RouteBuilder builder,
- ArrayList<String> expected) throws Exception {
+ protected void runTest(RouteBuilder builder, ArrayList<String> expected) throws Exception {
runTest(builder, expected, null);
}
- protected void runTest(RouteBuilder builder,
- ArrayList<String> expected, String header) throws Exception {
-
+ protected void runTest(RouteBuilder builder, ArrayList<String> expected, String header) throws Exception {
+
order.clear();
CamelContext container = new DefaultCamelContext();
@@ -105,44 +102,39 @@
}
Producer producer = endpoint.createProducer();
producer.process(exchange);
-
+
log.debug("Interceptor invocation order:" + order);
assertEquals(expected, order);
}
-
+
public void testRouteWithFilterEnd() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("TO");
-
+
runTest(new RouteBuilder() {
- public void configure() {
- from("direct:a")
- .filter(header("foo").isEqualTo("bar")).process(orderProcessor).end()
- .process(toProcessor);
- }
- }, expected, "banana");
+ public void configure() {
+ from("direct:a").filter(header("foo").isEqualTo("bar")).process(orderProcessor).end()
+ .process(toProcessor);
+ }
+ }, expected, "banana");
}
public void testRouteWithFilterNoEnd() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
-
+
runTest(new RouteBuilder() {
- public void configure() {
- from("direct:a")
- .filter(header("foo").isEqualTo("bar")).process(orderProcessor)
- .process(toProcessor);
- }
- }, expected, "banana");
+ public void configure() {
+ from("direct:a").filter(header("foo").isEqualTo("bar")).process(orderProcessor)
+ .process(toProcessor);
+ }
+ }, expected, "banana");
}
- protected RouteBuilder createChoiceBuilder() {
+ protected RouteBuilder createChoiceBuilder() {
return new RouteBuilder() {
public void configure() {
- from("direct:a")
- .choice()
- .when(header("foo").isEqualTo("bar")).process(orderProcessor)
- .when(header("foo").isEqualTo("cheese")).process(orderProcessor2)
- .end()
+ from("direct:a").choice().when(header("foo").isEqualTo("bar")).process(orderProcessor)
+ .when(header("foo").isEqualTo("cheese")).process(orderProcessor2).end()
.process(toProcessor);
}
};
@@ -152,50 +144,43 @@
ArrayList<String> expected = new ArrayList<String>();
expected.add("INVOKED");
expected.add("TO");
-
+
runTest(createChoiceBuilder(), expected, "bar");
- }
+ }
public void testRouteWithChoice2() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("INVOKED2");
expected.add("TO");
-
+
runTest(createChoiceBuilder(), expected, "cheese");
- }
+ }
public void testRouteWithChoice3() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("TO");
-
+
runTest(createChoiceBuilder(), expected, "banana");
- }
+ }
public void testRouteWithChoiceNoEnd() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("INVOKED");
-
+
runTest(new RouteBuilder() {
- public void configure() {
- from("direct:a")
- .choice()
- .when(header("foo").isEqualTo("bar")).process(orderProcessor)
- .when(header("foo").isEqualTo("cheese")).process(orderProcessor2)
- .process(toProcessor); // continuation of the second when clause
- }
- }, expected, "bar");
- }
+ public void configure() {
+ from("direct:a").choice().when(header("foo").isEqualTo("bar")).process(orderProcessor)
+ .when(header("foo").isEqualTo("cheese")).process(orderProcessor2).process(toProcessor); // continuation of the second when clause
+ }
+ }, expected, "bar");
+ }
- protected RouteBuilder createChoiceWithOtherwiseBuilder() {
+ protected RouteBuilder createChoiceWithOtherwiseBuilder() {
return new RouteBuilder() {
public void configure() {
- from("direct:a")
- .choice()
- .when(header("foo").isEqualTo("bar")).process(orderProcessor)
- .when(header("foo").isEqualTo("cheese")).process(orderProcessor2)
- .otherwise().process(orderProcessor3)
- .end()
- .process(toProcessor);
+ from("direct:a").choice().when(header("foo").isEqualTo("bar")).process(orderProcessor)
+ .when(header("foo").isEqualTo("cheese")).process(orderProcessor2).otherwise()
+ .process(orderProcessor3).end().process(toProcessor);
}
};
};
@@ -204,84 +189,76 @@
ArrayList<String> expected = new ArrayList<String>();
expected.add("INVOKED");
expected.add("TO");
-
+
runTest(createChoiceWithOtherwiseBuilder(), expected, "bar");
- }
+ }
public void testRouteWithChoiceOtherwise2() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("INVOKED2");
expected.add("TO");
-
+
runTest(createChoiceWithOtherwiseBuilder(), expected, "cheese");
- }
+ }
public void testRouteWithChoiceOtherwise3() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("INVOKED3");
expected.add("TO");
runTest(createChoiceWithOtherwiseBuilder(), expected, "banana");
- }
+ }
public void testRouteWithChoiceOtherwiseNoEnd() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("INVOKED");
-
+
runTest(new RouteBuilder() {
- public void configure() {
- from("direct:a")
- .choice()
- .when(header("foo").isEqualTo("bar")).process(orderProcessor)
- .when(header("foo").isEqualTo("cheese")).process(orderProcessor2)
- .otherwise().process(orderProcessor3)
- .process(toProcessor); // continuation of the otherwise clause
- }
- }, expected, "bar");
+ public void configure() {
+ from("direct:a").choice().when(header("foo").isEqualTo("bar")).process(orderProcessor)
+ .when(header("foo").isEqualTo("cheese")).process(orderProcessor2).otherwise()
+ .process(orderProcessor3).process(toProcessor); // continuation of the otherwise clause
+ }
+ }, expected, "bar");
}
-
- protected RouteBuilder createTryCatchNoEnd() {
+
+ protected RouteBuilder createTryCatchNoEnd() {
return new RouteBuilder() {
public void configure() {
- from("direct:a")
- .tryBlock().process(validator).process(toProcessor)
- .handle(ValidationException.class).process(orderProcessor)
- .process(orderProcessor3); // continuation of the handle clause
+ from("direct:a").tryBlock().process(validator).process(toProcessor)
+ .handle(ValidationException.class).process(orderProcessor).process(orderProcessor3); // continuation of the handle clause
}
};
};
-
+
public void testRouteWithTryCatchNoEndNoException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("VALIDATE");
expected.add("TO");
-
+
runTest(createTryCatchNoEnd(), expected, "bar");
}
-
+
public void testRouteWithTryCatchNoEndWithCaughtException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("VALIDATE");
expected.add("INVOKED");
expected.add("INVOKED3");
-
+
runTest(createTryCatchNoEnd(), expected, "banana");
}
public void testRouteWithTryCatchNoEndWithUncaughtException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.addAll(Collections.nCopies(6, "VALIDATE"));
-
+
runTest(createTryCatchNoEnd(), expected);
}
- protected RouteBuilder createTryCatchEnd() {
+ protected RouteBuilder createTryCatchEnd() {
return new RouteBuilder() {
public void configure() {
- from("direct:a")
- .tryBlock().process(validator).process(toProcessor)
- .handle(ValidationException.class).process(orderProcessor)
- .end()
- .process(orderProcessor3);
+ from("direct:a").tryBlock().process(validator).process(toProcessor)
+ .handle(ValidationException.class).process(orderProcessor).end().process(orderProcessor3);
}
};
};
@@ -291,55 +268,53 @@
expected.add("VALIDATE");
expected.add("TO");
expected.add("INVOKED3");
-
+
runTest(createTryCatchEnd(), expected, "bar");
}
-
+
public void testRouteWithTryCatchEndWithCaughtException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("VALIDATE");
expected.add("INVOKED");
expected.add("INVOKED3");
-
+
runTest(createTryCatchEnd(), expected, "banana");
}
public void testRouteWithTryCatchEndWithUncaughtException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.addAll(Collections.nCopies(6, "VALIDATE"));
-
+
runTest(createTryCatchEnd(), expected);
}
-
- protected RouteBuilder createTryCatchFinallyNoEnd() {
+
+ protected RouteBuilder createTryCatchFinallyNoEnd() {
return new RouteBuilder() {
public void configure() {
- from("direct:a")
- .tryBlock().process(validator).process(toProcessor)
- .handle(ValidationException.class).process(orderProcessor)
- .handleAll().process(orderProcessor2)
- .process(orderProcessor3); // continuation of the handleAll clause
+ from("direct:a").tryBlock().process(validator).process(toProcessor)
+ .handle(ValidationException.class).process(orderProcessor).handleAll()
+ .process(orderProcessor2).process(orderProcessor3); // continuation of the handleAll clause
}
};
};
-
+
public void testRouteWithTryCatchFinallyNoEndNoException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("VALIDATE");
expected.add("TO");
expected.add("INVOKED2");
expected.add("INVOKED3");
-
+
runTest(createTryCatchFinallyNoEnd(), expected, "bar");
}
-
+
public void testRouteWithTryCatchFinallyNoEndWithCaughtException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("VALIDATE");
expected.add("INVOKED");
expected.add("INVOKED2");
expected.add("INVOKED3");
-
+
runTest(createTryCatchFinallyNoEnd(), expected, "banana");
}
@@ -348,40 +323,37 @@
expected.add("VALIDATE");
expected.add("INVOKED2");
expected.add("INVOKED3");
-
+
runTest(createTryCatchFinallyNoEnd(), expected);
}
-
- protected RouteBuilder createTryCatchFinallyEnd() {
+
+ protected RouteBuilder createTryCatchFinallyEnd() {
return new RouteBuilder() {
public void configure() {
- from("direct:a")
- .tryBlock().process(validator).process(toProcessor)
- .handle(ValidationException.class).process(orderProcessor)
- .handleAll().process(orderProcessor2)
- .end()
- .process(orderProcessor3);
+ from("direct:a").tryBlock().process(validator).process(toProcessor)
+ .handle(ValidationException.class).process(orderProcessor).handleAll()
+ .process(orderProcessor2).end().process(orderProcessor3);
}
};
};
-
+
public void testRouteWithTryCatchFinallyEndNoException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("VALIDATE");
expected.add("TO");
expected.add("INVOKED2");
expected.add("INVOKED3");
-
+
runTest(createTryCatchFinallyEnd(), expected, "bar");
}
-
+
public void testRouteWithTryCatchFinallyEndWithCaughtException() throws Exception {
ArrayList<String> expected = new ArrayList<String>();
expected.add("VALIDATE");
expected.add("INVOKED");
expected.add("INVOKED2");
expected.add("INVOKED3");
-
+
runTest(createTryCatchFinallyEnd(), expected, "banana");
}
@@ -390,7 +362,7 @@
expected.add("VALIDATE");
expected.add("INVOKED2");
expected.add("INVOKED3");
-
+
runTest(createTryCatchFinallyEnd(), expected);
}
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ErrorHandlerTest.java Mon Mar 24 08:08:24 2008
@@ -16,28 +16,26 @@
*/
package org.apache.camel.builder;
+import java.util.List;
+
import org.apache.camel.Endpoint;
import org.apache.camel.Processor;
import org.apache.camel.Route;
import org.apache.camel.TestSupport;
import org.apache.camel.impl.EventDrivenConsumerRoute;
import org.apache.camel.processor.DeadLetterChannel;
-import org.apache.camel.processor.DelegateAsyncProcessor;
-import org.apache.camel.processor.DelegateProcessor;
import org.apache.camel.processor.FilterProcessor;
import org.apache.camel.processor.LoggingErrorHandler;
import org.apache.camel.processor.RedeliveryPolicy;
import org.apache.camel.processor.SendProcessor;
-import java.util.List;
-
/**
* @version $Revision$
*/
public class ErrorHandlerTest extends TestSupport {
- // TODO
- public void TODO_testOverloadingTheDefaultErrorHandler() throws Exception {
+ // TODO get the test fixed
+ public void xtestOverloadingTheDefaultErrorHandler() throws Exception {
// START SNIPPET: e1
RouteBuilder builder = new RouteBuilder() {
public void configure() {
@@ -68,7 +66,8 @@
RouteBuilder builder = new RouteBuilder() {
public void configure() {
from("seda:a").errorHandler(loggingErrorHandler("FOO.BAR")).to("seda:b");
- // this route will use the default error handler, DeadLetterChannel
+ // this route will use the default error handler,
+ // DeadLetterChannel
from("seda:b").to("seda:c");
}
};
@@ -84,19 +83,14 @@
SendProcessor sendProcessor = null;
if (endpointUri.equals("seda:a")) {
- LoggingErrorHandler
- loggingProcessor = assertIsInstanceOf(LoggingErrorHandler.class,
- processor);
+ LoggingErrorHandler loggingProcessor = assertIsInstanceOf(LoggingErrorHandler.class,
+ processor);
Processor outputProcessor = loggingProcessor.getOutput();
sendProcessor = assertIsInstanceOf(SendProcessor.class, outputProcessor);
- }
- else {
- assertEquals("From endpoint", "seda:b",
- endpointUri);
- DeadLetterChannel deadLetterChannel =
- assertIsInstanceOf(DeadLetterChannel.class, processor);
- Processor
- outputProcessor = deadLetterChannel.getOutput();
+ } else {
+ assertEquals("From endpoint", "seda:b", endpointUri);
+ DeadLetterChannel deadLetterChannel = assertIsInstanceOf(DeadLetterChannel.class, processor);
+ Processor outputProcessor = deadLetterChannel.getOutput();
sendProcessor = assertIsInstanceOf(SendProcessor.class, outputProcessor);
}
log.debug("For " + endpointUri + " using: " + sendProcessor);
@@ -126,16 +120,15 @@
}
}
- // TODO
- public void TODO_testConfigureDeadLetterChannelWithCustomRedeliveryPolicy() throws Exception {
+ // TODO Fix the test
+ public void xtestConfigureDeadLetterChannelWithCustomRedeliveryPolicy() throws Exception {
// START SNIPPET: e4
- RouteBuilder builder = new
- RouteBuilder() {
- public void configure() {
- errorHandler(deadLetterChannel("seda:errors").maximumRedeliveries(2).useExponentialBackOff());
- from("seda:a").to("seda:b");
- }
- };
+ RouteBuilder builder = new RouteBuilder() {
+ public void configure() {
+ errorHandler(deadLetterChannel("seda:errors").maximumRedeliveries(2).useExponentialBackOff());
+ from("seda:a").to("seda:b");
+ }
+ };
// END SNIPPET: e4
List<Route> list = getRouteList(builder);
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java Mon Mar 24 08:08:24 2008
@@ -16,7 +16,9 @@
*/
package org.apache.camel.builder;
-import org.apache.camel.CamelContext;
+import java.util.ArrayList;
+import java.util.List;
+
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
@@ -24,7 +26,6 @@
import org.apache.camel.Route;
import org.apache.camel.TestSupport;
import org.apache.camel.impl.EventDrivenConsumerRoute;
-import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.processor.ChoiceProcessor;
import org.apache.camel.processor.DeadLetterChannel;
import org.apache.camel.processor.DelegateProcessor;
@@ -37,8 +38,6 @@
import org.apache.camel.processor.idempotent.MemoryMessageIdRepository;
import static org.apache.camel.processor.idempotent.MemoryMessageIdRepository.memoryMessageIdRepository;
-import java.util.ArrayList;
-import java.util.List;
/**
* @version $Revision$
@@ -240,7 +239,7 @@
public void configure() {
from("seda:a").intercept(interceptor1).intercept(interceptor2).to("seda:d");
/*
- *
+ *
* TODO keep old DSL? .intercept() .add(interceptor1)
* .add(interceptor2) .target().to("seda:d");
*/
@@ -294,7 +293,7 @@
/*
* TODO FilterProcessor filterProcessor =
* assertIsInstanceOf(FilterProcessor.class, processor);
- *
+ *
* SendProcessor sendProcessor =
* assertIsInstanceOf(SendProcessor.class,
* filterProcessor.getProcessor()); assertEquals("Endpoint URI",
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanInvocationSerializeTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -31,7 +30,7 @@
public class BeanInvocationSerializeTest extends TestSupport {
public void testSerialize() throws Exception {
Method method = getClass().getMethod("cheese", String.class, String.class);
- BeanInvocation invocation = new BeanInvocation(method, new Object[] { "a", "b" });
+ BeanInvocation invocation = new BeanInvocation(method, new Object[] {"a", "b"});
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(buffer);
out.writeObject(invocation);
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithMultipleParametersTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithMultipleParametersTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithMultipleParametersTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanMethodWithMultipleParametersTest.java Mon Mar 24 08:08:24 2008
@@ -42,7 +42,8 @@
}
- public void DISABLED_testSendMessage() throws Exception {
+ //TODO fix this test
+ public void xtestSendMessage() throws Exception {
Object[] args = {"abc", 5, "def"};
template.sendBodyAndHeader("direct:in", args, BeanProcessor.METHOD_NAME, "myMethod");
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithExpressionInjectionTest.java Mon Mar 24 08:08:24 2008
@@ -16,15 +16,15 @@
*/
package org.apache.camel.component.bean;
+import javax.naming.Context;
+
import org.apache.camel.ContextTestSupport;
-import org.apache.camel.processor.BeanRouteTest;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.language.Simple;
+import org.apache.camel.processor.BeanRouteTest;
import org.apache.camel.util.jndi.JndiContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import javax.naming.Context;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithHeadersAndBodyInjectionTest.java Mon Mar 24 08:08:24 2008
@@ -84,13 +84,13 @@
return "MyBean[foo: " + headers + " body: " + body + "]";
}
- public void myMethod(@Headers Map<String, Object> headers,Object body) {
+ public void myMethod(@Headers Map<String, Object> headers, Object body) {
this.headers = headers;
this.body = body;
LOG.info("myMethod() method called on " + this);
}
- public void anotherMethod(@Headers Map<String, Object> headers,Object body) {
+ public void anotherMethod(@Headers Map<String, Object> headers, Object body) {
fail("Should not have called this method!");
}
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java Mon Mar 24 08:08:24 2008
@@ -16,6 +16,10 @@
*/
package org.apache.camel.component.bean;
+import java.util.Map;
+
+import javax.naming.Context;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.Headers;
@@ -27,9 +31,6 @@
import org.apache.camel.util.jndi.JndiContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import javax.naming.Context;
-import java.util.Map;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BodyAnnotationToDisambiguateMethodsTest.java Mon Mar 24 08:08:24 2008
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.bean;
+import javax.naming.Context;
+
import org.apache.camel.Body;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
@@ -23,8 +25,6 @@
import org.apache.camel.util.jndi.JndiContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import javax.naming.Context;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/ExpressionAnnotationToDisambiguateMethodsTest.java Mon Mar 24 08:08:24 2008
@@ -16,15 +16,15 @@
*/
package org.apache.camel.component.bean;
+import javax.naming.Context;
+
import org.apache.camel.ContextTestSupport;
-import org.apache.camel.language.Simple;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.language.Simple;
import org.apache.camel.processor.BeanRouteTest;
import org.apache.camel.util.jndi.JndiContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import javax.naming.Context;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/CustomDataSetTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -21,13 +20,13 @@
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
-import org.apache.camel.Predicate;
import org.apache.camel.Expression;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.builder.PredicateBuilder;
+import org.apache.camel.Predicate;
import org.apache.camel.builder.ExpressionBuilder;
+import org.apache.camel.builder.PredicateBuilder;
+import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.builder.xml.XPathBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
/**
* @version $Revision: 1.1 $
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumeTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumeTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetConsumeTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/dataset/DataSetTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -20,8 +19,8 @@
import javax.naming.Context;
import org.apache.camel.ContextTestSupport;
-import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
/**
* @version $Revision: 1.1 $
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/DirectoryCreateIssueTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -36,7 +35,7 @@
* @version $Revision$
*/
public class DirectoryCreateIssueTest extends TestSupport {
- private static final Logger log = Logger.getLogger(DirectoryCreateIssueTest.class);
+ private static final Logger LOG = Logger.getLogger(DirectoryCreateIssueTest.class);
private CamelContext context;
private CamelTemplate template;
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExchangeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExchangeTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExchangeTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExchangeTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,15 +16,15 @@
*/
package org.apache.camel.component.file;
+import java.io.File;
+import java.util.Collections;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
import org.apache.camel.ExchangePattern;
+import org.apache.camel.Processor;
import org.apache.camel.processor.Pipeline;
-import java.io.File;
-import java.util.Collections;
-
/**
* @version $Revision$
*/
@@ -64,7 +63,7 @@
Pipeline pipeline = new Pipeline(Collections.singletonList(myProcessor));
FileExchange exchange = new FileExchange(context, pattern, file);
- pipeline.process(exchange.copy());
+ pipeline.process(exchange.copy());
}
@Override
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteGenerateEmptyExchangeWhenIdleTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteGenerateEmptyExchangeWhenIdleTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteGenerateEmptyExchangeWhenIdleTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileRouteGenerateEmptyExchangeWhenIdleTest.java Mon Mar 24 08:08:24 2008
@@ -36,21 +36,21 @@
template.sendBodyAndHeader(uri, expectedBody, "cheese", 123);
result.assertIsSatisfied();
-
- int fileCount=0;
- int nullCount=0;
+
+ int fileCount = 0;
+ int nullCount = 0;
for (Exchange exchange : result.getReceivedExchanges()) {
- assertTrue( exchange instanceof FileExchange );
+ assertTrue(exchange instanceof FileExchange);
FileExchange fx = (FileExchange)exchange;
- if( fx.getFile() == null ) {
+ if (fx.getFile() == null) {
nullCount++;
} else {
fileCount++;
}
}
-
+
assertEquals(1, fileCount);
- assertTrue( nullCount > 0 );
+ assertTrue(nullCount > 0);
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/list/ListTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/list/ListTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/list/ListTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/list/ListTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -21,9 +20,9 @@
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.spi.BrowsableEndpoint;
import org.apache.camel.util.CamelContextHelper;
-import org.apache.camel.builder.RouteBuilder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/mock/MockEndpointTest.java Mon Mar 24 08:08:24 2008
@@ -95,21 +95,21 @@
}
public void testReset() throws Exception {
- MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
- resultEndpoint.expectedMessageCount(2);
-
- sendMessages(11, 12);
-
- resultEndpoint.assertIsSatisfied();
- resultEndpoint.reset();
-
- resultEndpoint.expectedMessageCount(3);
-
- sendMessages(11, 12, 13);
-
- resultEndpoint.assertIsSatisfied();
+ MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
+ resultEndpoint.expectedMessageCount(2);
+
+ sendMessages(11, 12);
+
+ resultEndpoint.assertIsSatisfied();
+ resultEndpoint.reset();
+
+ resultEndpoint.expectedMessageCount(3);
+
+ sendMessages(11, 12, 13);
+
+ resultEndpoint.assertIsSatisfied();
}
-
+
protected void sendMessages(int... counters) {
for (int counter : counters) {
template.sendBodyAndHeader("direct:a", "<message>" + counter + "</message>",
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaConfigureTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaConfigureTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaConfigureTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaConfigureTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -27,7 +26,7 @@
* @version $Revision$
*/
public class SedaConfigureTest extends ContextTestSupport {
-
+
public void testBlockingQueueConfigured() throws Exception {
SedaEndpoint endpoint = resolveMandatoryEndpoint("seda:foo?size=2000", SedaEndpoint.class);
BlockingQueue<Exchange> queue = endpoint.getQueue();
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/component/timer/TimerRouteTest.java Mon Mar 24 08:08:24 2008
@@ -16,17 +16,16 @@
*/
package org.apache.camel.component.timer;
-import org.apache.camel.CamelContext;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.naming.Context;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.util.jndi.JndiContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import javax.naming.Context;
-import java.util.concurrent.atomic.AtomicInteger;
-
/**
* @version $Revision$
*/
@@ -61,7 +60,7 @@
public static class MyBean {
public AtomicInteger counter = new AtomicInteger(0);
- public void someMethod(){
+ public void someMethod() {
LOG.debug("Invoked someMethod()");
counter.incrementAndGet();
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java Mon Mar 24 08:08:24 2008
@@ -20,18 +20,17 @@
import java.beans.PropertyEditorSupport;
import java.io.File;
import java.io.InputStream;
+import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
-import java.net.URL;
import junit.framework.TestCase;
-
import org.apache.camel.TypeConverter;
-import org.apache.camel.util.IntrospectionSupport;
import org.apache.camel.impl.ReflectionInjector;
import org.apache.camel.impl.converter.DefaultTypeConverter;
+import org.apache.camel.util.IntrospectionSupport;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java Mon Mar 24 08:08:24 2008
@@ -16,21 +16,23 @@
*/
package org.apache.camel.converter;
-import java.io.StringReader;
import java.io.InputStream;
+import java.io.StringReader;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
import junit.framework.TestCase;
import org.apache.camel.TypeConverter;
import org.apache.camel.impl.ReflectionInjector;
import org.apache.camel.impl.converter.DefaultTypeConverter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
+
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/converter/ObjectConverterTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,9 +16,9 @@
*/
package org.apache.camel.converter;
-import junit.framework.TestCase;
-
import java.util.Iterator;
+
+import junit.framework.TestCase;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CustomExchangePatternTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CustomExchangePatternTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CustomExchangePatternTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CustomExchangePatternTest.java Mon Mar 24 08:08:24 2008
@@ -16,14 +16,14 @@
*/
package org.apache.camel.impl;
+import java.util.List;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.ExchangePattern;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
-
-import java.util.List;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/ProducerTest.java Mon Mar 24 08:08:24 2008
@@ -22,10 +22,10 @@
import org.apache.camel.Consumer;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
+import org.apache.camel.ExchangePattern;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
import org.apache.camel.TestSupport;
-import org.apache.camel.ExchangePattern;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/AmahDeadLetterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/AmahDeadLetterTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/AmahDeadLetterTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/AmahDeadLetterTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ExceptionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ExceptionTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ExceptionTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/ExceptionTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -61,7 +60,7 @@
assertMockEndpointsSatisifed();
}
-
+
public void testLongRouteWithHandler() throws Exception {
MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
MockEndpoint exceptionEndpoint = getMockEndpoint("mock:exception");
@@ -73,7 +72,7 @@
assertMockEndpointsSatisifed();
}
-
+
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
final Processor exceptionThrower = new Processor() {
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/Issue170Test.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/Issue170Test.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/Issue170Test.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/Issue170Test.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -25,13 +24,13 @@
* @version $Revision$
*/
public class Issue170Test extends ContextTestSupport {
- protected String Q1 = "seda:Q1";
- protected String Q2 = "mock:Q2";
- protected String Q3 = "mock:Q3";
+ protected String qOne = "seda:Q1";
+ protected String qTwo = "mock:Q2";
+ protected String qThree = "mock:Q3";
public void testSendMessagesGetCorrectCounts() throws Exception {
- MockEndpoint q2 = getMockEndpoint(Q2);
- MockEndpoint q3 = getMockEndpoint(Q3);
+ MockEndpoint q2 = getMockEndpoint(qTwo);
+ MockEndpoint q3 = getMockEndpoint(qThree);
String body1 = "<message id='1'/>";
String body2 = "<message id='2'/>";
@@ -48,8 +47,8 @@
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
- from("direct:start").to(Q1);
- from(Q1).to(Q2, Q3); // write to Q3 but not to Q2
+ from("direct:start").to(qOne);
+ from(qOne).to(qTwo, qThree); // write to Q3 but not to Q2
}
};
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/NeilSplitterTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -17,6 +16,7 @@
*/
package org.apache.camel.issues;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
@@ -24,8 +24,8 @@
import org.apache.camel.Message;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.builder.xml.XPathBuilder.xpath;
import org.apache.camel.component.mock.MockEndpoint;
+import static org.apache.camel.builder.xml.XPathBuilder.xpath;
/**
* @version $Revision$
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RomeksExceptionTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SetHeaderIssueTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SetHeaderIssueTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SetHeaderIssueTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/SetHeaderIssueTest.java Mon Mar 24 08:08:24 2008
@@ -1,5 +1,4 @@
/**
- *
* 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.
@@ -7,7 +6,7 @@
* (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
+ * 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,
@@ -20,8 +19,6 @@
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
-import org.apache.camel.model.FilterType;
-import org.apache.camel.model.ProcessorType;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.builder.xml.Namespaces;
import org.apache.camel.component.mock.MockEndpoint;
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/SimpleTest.java Mon Mar 24 08:08:24 2008
@@ -45,8 +45,7 @@
try {
assertExpression("hey ${foo", "bad expression!");
fail("Should have thrown an exception!");
- }
- catch (IllegalArgumentException e) {
+ } catch (IllegalArgumentException e) {
log.debug("Caught expected exception: " + e, e);
}
}
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/XPathTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/XPathTest.java?rev=640438&r1=640437&r2=640438&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/XPathTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/language/XPathTest.java Mon Mar 24 08:08:24 2008
@@ -16,11 +16,11 @@
*/
package org.apache.camel.language;
+import javax.xml.xpath.XPathConstants;
+
import org.apache.camel.LanguageTestSupport;
import org.apache.camel.builder.xml.XPathLanguage;
import org.apache.camel.spi.Language;
-
-import javax.xml.xpath.XPathConstants;
/**
* @version $Revision$