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 2011/08/25 05:36:06 UTC
svn commit: r1161373 - in /camel/trunk/components:
camel-test/src/test/java/org/apache/camel/test/patterns/
camel-test/src/test/resources/org/ camel-test/src/test/resources/org/apache/
camel-test/src/test/resources/org/apache/camel/ camel-test/src/test...
Author: ningjiang
Date: Thu Aug 25 03:36:05 2011
New Revision: 1161373
URL: http://svn.apache.org/viewvc?rev=1161373&view=rev
Log:
CAMEL-4374 Fixed the issue that The debugger doesn't work in the CamelSpringTestSupport with route defined in XML
Added:
camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java (with props)
camel/trunk/components/camel-test/src/test/resources/org/
camel/trunk/components/camel-test/src/test/resources/org/apache/
camel/trunk/components/camel-test/src/test/resources/org/apache/camel/
camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/
camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/
camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml (with props)
camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringCamelContextTest.java (with props)
camel/trunk/components/camel-testng/src/test/resources/org/
camel/trunk/components/camel-testng/src/test/resources/org/apache/
camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/
camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/
camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/
camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml (with props)
Modified:
camel/trunk/components/camel-testng/pom.xml
camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelSpringTestSupport.java
camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringTest.java
Added: camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java?rev=1161373&view=auto
==============================================================================
--- camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java (added)
+++ camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java Thu Aug 25 03:36:05 2011
@@ -0,0 +1,41 @@
+/**
+ * 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.test.patterns;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.spring.SpringCamelContext;
+import org.springframework.context.support.AbstractApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+
+public class DebugSpringCamelContextTest extends DebugSpringTest {
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ // there is no route to be used
+ }
+ };
+ }
+
+ @Override
+ protected AbstractApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext("org/apache/camel/test/patterns/applicationContext.xml");
+ }
+}
Propchange: camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml?rev=1161373&view=auto
==============================================================================
--- camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml (added)
+++ camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml Thu Aug 25 03:36:05 2011
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:camel="http://camel.apache.org/schema/spring"
+ xsi:schemaLocation="
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+
+ <camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring" trace="true" autoStartup="true" >
+
+ <route>
+ <from uri="direct:start" />
+ <to uri="mock:a" />
+ <transform>
+ <simple>Hello ${body}</simple>
+ </transform>
+ <to uri="mock:b" />
+ </route>
+ </camelContext>
+
+</beans>
\ No newline at end of file
Propchange: camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-test/src/test/resources/org/apache/camel/test/patterns/applicationContext.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: camel/trunk/components/camel-testng/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/pom.xml?rev=1161373&r1=1161372&r2=1161373&view=diff
==============================================================================
--- camel/trunk/components/camel-testng/pom.xml (original)
+++ camel/trunk/components/camel-testng/pom.xml Thu Aug 25 03:36:05 2011
@@ -59,23 +59,4 @@
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkMode>pertest</forkMode>
- <childDelegation>false</childDelegation>
- <useFile>true</useFile>
- <failIfNoTests>false</failIfNoTests>
- <runOrder>alphabetical</runOrder>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
</project>
Modified: camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelSpringTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelSpringTestSupport.java?rev=1161373&r1=1161372&r2=1161373&view=diff
==============================================================================
--- camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelSpringTestSupport.java (original)
+++ camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelSpringTestSupport.java Thu Aug 25 03:36:05 2011
@@ -30,27 +30,58 @@ import org.apache.camel.impl.scan.Invert
import org.apache.camel.spring.SpringCamelContext;
import org.apache.camel.util.CastUtils;
import org.apache.camel.util.ObjectHelper;
-import org.junit.AfterClass;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
+import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterTest;
+
/**
* @version $Revision$
*/
public abstract class CamelSpringTestSupport extends CamelTestSupport {
+ protected static ThreadLocal<AbstractApplicationContext> threadAppContext
+ = new ThreadLocal<AbstractApplicationContext>();
+ protected static Object lock = new Object();
protected static AbstractApplicationContext applicationContext;
protected abstract AbstractApplicationContext createApplicationContext();
@Override
- public void doSetUp() throws Exception {
- applicationContext = createApplicationContext();
- super.doSetUp();
+ public void postProcessTest() throws Exception {
+ super.postProcessTest();
+ if (isCreateCamelContextPerClass()) {
+ applicationContext = threadAppContext.get();
+ }
}
@Override
+ public void doPreSetup() throws Exception {
+ if (!"true".equalsIgnoreCase(System.getProperty("skipStartingCamelContext"))) {
+ // tell camel-spring it should not trigger starting CamelContext, since we do that later
+ // after we are finished setting up the unit test
+ synchronized (lock) {
+ SpringCamelContext.setNoStart(true);
+ if (isCreateCamelContextPerClass()) {
+ applicationContext = threadAppContext.get();
+ if (applicationContext == null) {
+ applicationContext = createApplicationContext();
+ threadAppContext.set(applicationContext);
+ }
+ } else {
+ applicationContext = createApplicationContext();
+ }
+ assertNotNull(applicationContext, "Should have created a valid spring context");
+ SpringCamelContext.setNoStart(false);
+ }
+ } else {
+ log.info("Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.");
+ }
+ }
+
+
+ @Override
@AfterTest
public void tearDown() throws Exception {
super.tearDown();
@@ -65,9 +96,9 @@ public abstract class CamelSpringTestSup
@AfterClass
public static void tearSpringDownAfterClass() throws Exception {
- if (applicationContext != null) {
- applicationContext.destroy();
- applicationContext = null;
+ if (threadAppContext.get() != null) {
+ threadAppContext.get().destroy();
+ threadAppContext.remove();
}
}
Modified: camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java?rev=1161373&r1=1161372&r2=1161373&view=diff
==============================================================================
--- camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java (original)
+++ camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java Thu Aug 25 03:36:05 2011
@@ -48,9 +48,9 @@ import org.apache.camel.spi.Language;
import org.apache.camel.spring.CamelBeanPostProcessor;
import org.apache.camel.util.StopWatch;
import org.apache.camel.util.TimeUtils;
-import org.junit.AfterClass;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@@ -61,18 +61,30 @@ import org.testng.annotations.BeforeMeth
* @version $Revision$
*/
public abstract class CamelTestSupport extends TestSupport {
-
- protected static volatile CamelContext context;
- protected static volatile ProducerTemplate template;
- protected static volatile ConsumerTemplate consumer;
- protected static volatile Service camelContextService;
private static final Logger LOG = LoggerFactory.getLogger(TestSupport.class);
- private static final AtomicBoolean INIT = new AtomicBoolean();
+ private static final ThreadLocal<Boolean> INIT = new ThreadLocal<Boolean>();
+
+
+ private static ThreadLocal<CamelContext> threadCamelContext
+ = new ThreadLocal<CamelContext>();
+ private static ThreadLocal<ProducerTemplate> threadTemplate
+ = new ThreadLocal<ProducerTemplate>();
+ private static ThreadLocal<ConsumerTemplate> threadConsumer
+ = new ThreadLocal<ConsumerTemplate>();
+ private static ThreadLocal<Service> threadService
+ = new ThreadLocal<Service>();
+
+ protected volatile CamelContext context;
+ protected volatile ProducerTemplate template;
+ protected volatile ConsumerTemplate consumer;
+ protected volatile Service camelContextService;
+
+
private boolean useRouteBuilder = true;
private final DebugBreakpoint breakpoint = new DebugBreakpoint();
private final StopWatch watch = new StopWatch();
- /**
+ /**
* Use the RouteBuilder or not
* @return <tt>true</tt> then {@link CamelContext} will be auto started,
* <tt>false</tt> then {@link CamelContext} will <b>not</b> be auto started (you will have to start it manually)
@@ -108,6 +120,9 @@ public abstract class CamelTestSupport e
* <p/>
* <b>Important:</b> Use this with care as the {@link CamelContext} will carry over state
* from previous tests, such as endpoints, components etc. So you cannot use this in all your tests.
+ * <p/>
+ * Setting up {@link CamelContext} uses the {@link #doPreSetup()}, {@link #doSetUp()}, and {@link #doPostSetup()}
+ * methods in that given order.
*
* @return <tt>true</tt> per class, <tt>false</tt> per test.
*/
@@ -139,6 +154,22 @@ public abstract class CamelTestSupport e
return camelContextService;
}
+ public Service camelContextService() {
+ return camelContextService;
+ }
+
+ public CamelContext context() {
+ return context;
+ }
+
+ public ProducerTemplate template() {
+ return template;
+ }
+
+ public ConsumerTemplate consumer() {
+ return consumer;
+ }
+
/**
* Allows a service to be registered a separate lifecycle service to start
* and stop the context; such as for Spring when the ApplicationContext is
@@ -146,6 +177,7 @@ public abstract class CamelTestSupport e
*/
public void setCamelContextService(Service service) {
camelContextService = service;
+ threadService.set(camelContextService);
}
@BeforeMethod
@@ -154,11 +186,13 @@ public abstract class CamelTestSupport e
log.info("Testing: " + getTestMethodName() + "(" + getClass().getName() + ")");
log.info("********************************************************************************");
- boolean first = INIT.compareAndSet(false, true);
if (isCreateCamelContextPerClass()) {
// test is per class, so only setup once (the first time)
+ boolean first = INIT.get() == null;
if (first) {
+ doPreSetup();
doSetUp();
+ doPostSetup();
} else {
// and in between tests we must do IoC and reset mocks
postProcessTest();
@@ -166,14 +200,30 @@ public abstract class CamelTestSupport e
}
} else {
// test is per test so always setup
+ doPreSetup();
doSetUp();
+ doPostSetup();
}
// only start timing after all the setup
watch.restart();
}
- protected void doSetUp() throws Exception {
+ /**
+ * Strategy to perform any pre setup, before {@link CamelContext} is created
+ */
+ protected void doPreSetup() throws Exception {
+ // noop
+ }
+
+ /**
+ * Strategy to perform any post setup after {@link CamelContext} is createt.
+ */
+ protected void doPostSetup() throws Exception {
+ // noop
+ }
+
+ private void doSetUp() throws Exception {
log.debug("setUp test");
if (!useJmx()) {
disableJMX();
@@ -182,6 +232,8 @@ public abstract class CamelTestSupport e
}
context = createCamelContext();
+ threadCamelContext.set(context);
+
assertNotNull(context, "No context found!");
// reduce default shutdown timeout to avoid waiting for 300 seconds
@@ -199,6 +251,9 @@ public abstract class CamelTestSupport e
consumer = context.createConsumerTemplate();
consumer.start();
+ threadTemplate.set(template);
+ threadConsumer.set(consumer);
+
// enable auto mocking if enabled
String pattern = isMockEndpoints();
if (pattern != null) {
@@ -245,17 +300,17 @@ public abstract class CamelTestSupport e
return;
}
- log.debug("tearDown test");
- doStopTemplates();
- stopCamelContext();
+ LOG.debug("tearDown test");
+ doStopTemplates(consumer, template);
+ doStopCamelContext(context, camelContextService);
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
- INIT.set(false);
+ INIT.remove();
LOG.debug("tearDownAfterClass test");
- doStopTemplates();
- doStopCamelContext();
+ doStopTemplates(threadConsumer.get(), threadTemplate.get());
+ doStopCamelContext(threadCamelContext.get(), threadService.get());
}
/**
@@ -294,53 +349,56 @@ public abstract class CamelTestSupport e
* Note that using Spring Test or Guice is a more powerful approach.
*/
protected void postProcessTest() throws Exception {
+ context = threadCamelContext.get();
+ template = threadTemplate.get();
+ consumer = threadConsumer.get();
+ camelContextService = threadService.get();
+
CamelBeanPostProcessor processor = new CamelBeanPostProcessor();
processor.setCamelContext(context);
processor.postProcessBeforeInitialization(this, "this");
}
protected void stopCamelContext() throws Exception {
- doStopCamelContext();
+ doStopCamelContext(context, camelContextService);
}
- private static void doStopCamelContext() throws Exception {
+ private static void doStopCamelContext(CamelContext context,
+ Service camelContextService) throws Exception {
if (camelContextService != null) {
+ if (camelContextService == threadService.get()) {
+ threadService.remove();
+ }
camelContextService.stop();
camelContextService = null;
} else {
if (context != null) {
+ if (context == threadCamelContext.get()) {
+ threadCamelContext.remove();
+ }
context.stop();
context = null;
}
}
}
- private static void doStopTemplates() throws Exception {
+ private static void doStopTemplates(ConsumerTemplate consumer,
+ ProducerTemplate template) throws Exception {
if (consumer != null) {
+ if (consumer == threadConsumer.get()) {
+ threadConsumer.remove();
+ }
consumer.stop();
consumer = null;
}
if (template != null) {
+ if (template == threadTemplate.get()) {
+ threadTemplate.remove();
+ }
template.stop();
template = null;
}
}
-
- public Service camelContextService() {
- return camelContextService;
- }
-
- public CamelContext context() {
- return context;
- }
-
- public ProducerTemplate template() {
- return template;
- }
-
- public ConsumerTemplate consumer() {
- return consumer;
- }
protected void startCamelContext() throws Exception {
if (camelContextService != null) {
Added: camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringCamelContextTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringCamelContextTest.java?rev=1161373&view=auto
==============================================================================
--- camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringCamelContextTest.java (added)
+++ camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringCamelContextTest.java Thu Aug 25 03:36:05 2011
@@ -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.testng.patterns;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.springframework.context.support.AbstractApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+
+public class DebugSpringCamelContextTest extends DebugSpringTest {
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ // there is no route to be used
+ }
+ };
+ }
+
+ @Override
+ protected AbstractApplicationContext createApplicationContext() {
+ return new ClassPathXmlApplicationContext("org/apache/camel/testng/patterns/applicationContext.xml");
+ }
+}
Propchange: camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringCamelContextTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringCamelContextTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringTest.java?rev=1161373&r1=1161372&r2=1161373&view=diff
==============================================================================
--- camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringTest.java (original)
+++ camel/trunk/components/camel-testng/src/test/java/org/apache/camel/testng/patterns/DebugSpringTest.java Thu Aug 25 03:36:05 2011
@@ -21,10 +21,12 @@ import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.model.ProcessorDefinition;
import org.apache.camel.testng.CamelSpringTestSupport;
-import org.junit.Test;
+
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
+import org.testng.annotations.Test;
+
public class DebugSpringTest extends CamelSpringTestSupport {
private boolean debugged;
Added: camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml?rev=1161373&view=auto
==============================================================================
--- camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml (added)
+++ camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml Thu Aug 25 03:36:05 2011
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:camel="http://camel.apache.org/schema/spring"
+ xsi:schemaLocation="
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+
+ <camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring" trace="true" autoStartup="true" >
+
+ <route>
+ <from uri="direct:start" />
+ <to uri="mock:a" />
+ <transform>
+ <simple>Hello ${body}</simple>
+ </transform>
+ <to uri="mock:b" />
+ </route>
+ </camelContext>
+
+</beans>
\ No newline at end of file
Propchange: camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-testng/src/test/resources/org/apache/camel/testng/patterns/applicationContext.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml