camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1437139 - in /camel/trunk/components/camel-spring/src/test/java/org/apache/camel: component/bean/ component/dataset/ spring/ spring/config/ spring/file/ spring/mock/ spring/patterns/ spring/placeholder/ spring/processor/ spring/produce/ sp...
Date Tue, 22 Jan 2013 20:08:30 GMT
Author: bvahdat
Date: Tue Jan 22 20:08:29 2013
New Revision: 1437139

URL: http://svn.apache.org/viewvc?rev=1437139&view=rev
Log:
CAMEL-5998: Avoid using the deprecated AbstractJUnit38SpringContextTests.

Added:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringRunWithTestSupport.java   (with props)
Modified:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanRouteUsingSpringEndpointTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/dataset/SpringDataSetTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/NodeIdReferenceTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringConsumerTemplateTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAlreadyExistTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAutoRegisterTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateHasTwoTemplatesTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomExecutorServiceManagerTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomThreadPoolFactoryTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DeadLetterChannelRedeliveryConfigTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DefaultErrorHandlerConfigTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DependencyInjectCamelTemplateTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/EndpointUriSetFromSpringTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ErrorHandlerConfigTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/NamespacePrefixTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAlreadyExistTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterBeanIdExistsTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTwoCamelContextsTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateHasTwoTemplatesTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMaximumCacheSizeTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMixedAutoRegisterTwoCamelContextsTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileAntPathMatcherFileFilterTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileRouteTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringSimpleFileNameWithQuoteTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/MyAssertions.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/placeholder/SimpleLanguageWithSprinPropertyPlaceholderRouteTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/XsltTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/MyCoolBeanTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateWithTwoCamelContextTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/SpringRemotingWithOneWayTest.java

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanRouteUsingSpringEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanRouteUsingSpringEndpointTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanRouteUsingSpringEndpointTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanRouteUsingSpringEndpointTest.java Tue Jan 22 20:08:29 2013
@@ -20,15 +20,16 @@ import javax.annotation.Resource;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class BeanRouteUsingSpringEndpointTest extends AbstractJUnit38SpringContextTests {
+public class BeanRouteUsingSpringEndpointTest extends SpringRunWithTestSupport {
     @Autowired
     protected ProducerTemplate template;
     @Resource
@@ -38,6 +39,7 @@ public class BeanRouteUsingSpringEndpoin
 
     protected String body = "James";
 
+    @Test
     public void testSayHello() throws Exception {
         assertNotNull(helloEndpoint);
         assertNotNull(goodbyeEndpoint);
@@ -47,6 +49,7 @@ public class BeanRouteUsingSpringEndpoin
         assertEquals("Returned value", "Hello James!", value);
     }
 
+    @Test
     public void testSayGoodbye() throws Exception {
         Object value = template.requestBody(goodbyeEndpoint, body);
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/bean/BeanWithRecipientListTest.java Tue Jan 22 20:08:29 2013
@@ -19,16 +19,16 @@ package org.apache.camel.component.bean;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class BeanWithRecipientListTest extends AbstractJUnit4SpringContextTests {
+public class BeanWithRecipientListTest extends SpringRunWithTestSupport {
     @Autowired
     protected ProducerTemplate template;
     @EndpointInject(uri = "mock:a")

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/dataset/SpringDataSetTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/dataset/SpringDataSetTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/dataset/SpringDataSetTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/dataset/SpringDataSetTest.java Tue Jan 22 20:08:29 2013
@@ -18,18 +18,20 @@ package org.apache.camel.component.datas
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class SpringDataSetTest extends AbstractJUnit38SpringContextTests {
+public class SpringDataSetTest extends SpringRunWithTestSupport {
     @Autowired
     protected CamelContext camelContext;
 
+    @Test
     public void testRun() throws Exception {
         MockEndpoint.assertIsSatisfied(camelContext);
     }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java Tue Jan 22 20:08:29 2013
@@ -40,10 +40,10 @@ public class CamelContextAwareTest exten
     
     public void testCamelTemplates() throws Exception {
         DefaultProducerTemplate producer1 = getMandatoryBean(DefaultProducerTemplate.class, "producer1");
-        assertEquals("Inject a wrong camel context", producer1.getContext().getName(), "camel1");
+        assertEquals("Inject a wrong camel context", producer1.getCamelContext().getName(), "camel1");
         
         DefaultProducerTemplate producer2 = getMandatoryBean(DefaultProducerTemplate.class, "producer2");
-        assertEquals("Inject a wrong camel context", producer2.getContext().getName(), "camel2");
+        assertEquals("Inject a wrong camel context", producer2.getCamelContext().getName(), "camel2");
         
         DefaultConsumerTemplate consumer = getMandatoryBean(DefaultConsumerTemplate.class, "consumer");
         assertEquals("Inject a wrong camel context", consumer.getCamelContext().getName(), "camel2");

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/NodeIdReferenceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/NodeIdReferenceTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/NodeIdReferenceTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/NodeIdReferenceTest.java Tue Jan 22 20:08:29 2013
@@ -20,15 +20,15 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class NodeIdReferenceTest extends AbstractJUnit38SpringContextTests {
+public class NodeIdReferenceTest extends SpringRunWithTestSupport {
     protected String expectedBody = "Godday World";
 
     @Autowired
@@ -40,6 +40,7 @@ public class NodeIdReferenceTest extends
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint result;
 
+    @Test
     public void testNodeIdReference() throws Exception {
         result.expectedBodiesReceived(expectedBody);
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringConsumerTemplateTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringConsumerTemplateTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringConsumerTemplateTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringConsumerTemplateTest.java Tue Jan 22 20:08:29 2013
@@ -20,9 +20,9 @@ import org.apache.camel.ConsumerTemplate
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * Unit test using the ConsumerTemplate
@@ -31,7 +31,7 @@ import org.springframework.test.context.
  */
 // START SNIPPET: e1
 @ContextConfiguration
-public class SpringConsumerTemplateTest extends AbstractJUnit38SpringContextTests {
+public class SpringConsumerTemplateTest extends SpringRunWithTestSupport {
 
     @Autowired
     private ProducerTemplate producer;
@@ -42,6 +42,7 @@ public class SpringConsumerTemplateTest 
     @EndpointInject(ref = "result")
     private MockEndpoint mock;
 
+    @Test
     public void testConsumeTemplate() throws Exception {
         // we expect Hello World received in our mock endpoint
         mock.expectedBodiesReceived("Hello World");

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringRunWithTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringRunWithTestSupport.java?rev=1437139&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringRunWithTestSupport.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringRunWithTestSupport.java Tue Jan 22 20:08:29 2013
@@ -0,0 +1,34 @@
+/**
+ * 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.spring;
+
+import java.lang.annotation.Inherited;
+
+import org.apache.camel.TestSupport;
+import org.junit.runner.RunWith;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * As the {@link RunWith} annotation is flagged to be {@link Inherited} we
+ * make use of this class as the base class of those tests where we need
+ * {@link SpringJUnit4ClassRunner} as the test runner but at the same time
+ * require the useful testing methods provided by {@link TestSupport}.
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+public class SpringRunWithTestSupport extends TestSupport {
+
+}

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringRunWithTestSupport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelProxyTest.java Tue Jan 22 20:08:29 2013
@@ -16,8 +16,6 @@
  */
 package org.apache.camel.spring.config;
 
-import junit.framework.TestCase;
-
 import org.apache.camel.TestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spring.SpringCamelContext;
@@ -27,7 +25,7 @@ import org.springframework.context.suppo
 /**
  * @version 
  */
-public class CamelProxyTest extends TestCase {
+public class CamelProxyTest extends TestSupport {
 
     public void testCamelProxy() throws Exception {
         ApplicationContext ac = new ClassPathXmlApplicationContext("org/apache/camel/spring/config/CamelProxyTest.xml");
@@ -40,7 +38,7 @@ public class CamelProxyTest extends Test
         // test sending inOnly message
         MyProxySender anotherSender = ac.getBean("myAnotherProxySender", MyProxySender.class);
         SpringCamelContext context = ac.getBeansOfType(SpringCamelContext.class).values().iterator().next();
-        MockEndpoint result = TestSupport.resolveMandatoryEndpoint(context, "mock:result", MockEndpoint.class);
+        MockEndpoint result = resolveMandatoryEndpoint(context, "mock:result", MockEndpoint.class);
         result.expectedBodiesReceived("Hello my friends!");
         
         anotherSender.greeting("Hello my friends!");

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAlreadyExistTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAlreadyExistTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAlreadyExistTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAlreadyExistTest.java Tue Jan 22 20:08:29 2013
@@ -18,15 +18,16 @@ package org.apache.camel.spring.config;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ConsumerTemplateAlreadyExistTest extends AbstractJUnit38SpringContextTests {
+public class ConsumerTemplateAlreadyExistTest extends SpringRunWithTestSupport {
 
     @Autowired
     private ConsumerTemplate template;
@@ -34,6 +35,7 @@ public class ConsumerTemplateAlreadyExis
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testHasExistingTemplate() {
         assertNotNull("Should have injected a consumer template", template);
 
@@ -44,6 +46,7 @@ public class ConsumerTemplateAlreadyExis
         assertNull("Should not be able to lookup consumer template", lookup2);
     }
 
+    @Test
     public void testShouldBeSingleton() {
         ConsumerTemplate lookup = context.getRegistry().lookup("myConsumerTemplate", ConsumerTemplate.class);
         assertNotNull("Should lookup producer template", lookup);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAutoRegisterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAutoRegisterTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAutoRegisterTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateAutoRegisterTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.config;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
 import org.apache.camel.impl.DefaultConsumerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ConsumerTemplateAutoRegisterTest extends AbstractJUnit38SpringContextTests {
+public class ConsumerTemplateAutoRegisterTest extends SpringRunWithTestSupport {
 
     @Autowired
     private ConsumerTemplate template;
@@ -35,6 +36,7 @@ public class ConsumerTemplateAutoRegiste
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testHasTemplate() {
         assertNotNull("Should have injected a consumer template", template);
         assertNotNull("The template context should not be null", ((DefaultConsumerTemplate)template).getCamelContext());

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateHasTwoTemplatesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateHasTwoTemplatesTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateHasTwoTemplatesTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateHasTwoTemplatesTest.java Tue Jan 22 20:08:29 2013
@@ -18,19 +18,21 @@ package org.apache.camel.spring.config;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ConsumerTemplateHasTwoTemplatesTest extends AbstractJUnit38SpringContextTests {
+public class ConsumerTemplateHasTwoTemplatesTest extends SpringRunWithTestSupport {
 
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testHasTwoTemplates() {
         ConsumerTemplate lookup = context.getRegistry().lookup("myTemplate", ConsumerTemplate.class);
         assertNotNull("Should lookup producer template", lookup);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ConsumerTemplateMaximumCacheSizeTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.config;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
 import org.apache.camel.Endpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ConsumerTemplateMaximumCacheSizeTest extends AbstractJUnit38SpringContextTests {
+public class ConsumerTemplateMaximumCacheSizeTest extends SpringRunWithTestSupport {
 
     @Autowired
     private ConsumerTemplate template;
@@ -35,6 +36,7 @@ public class ConsumerTemplateMaximumCach
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testTemplateMaximumCache() throws Exception {
         assertNotNull("Should have injected a consumer template", template);
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomExecutorServiceManagerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomExecutorServiceManagerTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomExecutorServiceManagerTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomExecutorServiceManagerTest.java Tue Jan 22 20:08:29 2013
@@ -16,23 +16,24 @@
  */
 package org.apache.camel.spring.config;
 
-import junit.framework.Assert;
 import org.apache.camel.CamelContext;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class CustomExecutorServiceManagerTest extends AbstractJUnit38SpringContextTests {
+public class CustomExecutorServiceManagerTest extends SpringRunWithTestSupport {
 
     @Autowired
     protected CamelContext context;
 
+    @Test
     public void testCustomExecutorService() throws Exception {
-        Assert.assertTrue(context.getExecutorServiceManager() instanceof CustomExecutorServiceManager);
+        assertIsInstanceOf(CustomExecutorServiceManager.class, context.getExecutorServiceManager());
     }
 
 }
\ No newline at end of file

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomThreadPoolFactoryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomThreadPoolFactoryTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomThreadPoolFactoryTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CustomThreadPoolFactoryTest.java Tue Jan 22 20:08:29 2013
@@ -21,27 +21,27 @@ import java.util.concurrent.RejectedExec
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 
-import junit.framework.Assert;
 import org.apache.camel.CamelContext;
 import org.apache.camel.impl.DefaultThreadPoolFactory;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class CustomThreadPoolFactoryTest extends AbstractJUnit38SpringContextTests {
+public class CustomThreadPoolFactoryTest extends SpringRunWithTestSupport {
 
     @Autowired
     protected CamelContext context;
 
+    @Test
     public void testCustomThreadPoolFactory() throws Exception {
         context.getExecutorServiceManager().newSingleThreadExecutor(this, "foo");
-        Assert.assertTrue(context.getExecutorServiceManager().getThreadPoolFactory() instanceof MyCustomThreadPoolFactory);
 
-        MyCustomThreadPoolFactory factory = (MyCustomThreadPoolFactory) context.getExecutorServiceManager().getThreadPoolFactory();
+        MyCustomThreadPoolFactory factory = assertIsInstanceOf(MyCustomThreadPoolFactory.class, context.getExecutorServiceManager().getThreadPoolFactory());
         assertTrue("Should use custom thread pool factory", factory.isInvoked());
     }
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DeadLetterChannelRedeliveryConfigTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DeadLetterChannelRedeliveryConfigTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DeadLetterChannelRedeliveryConfigTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DeadLetterChannelRedeliveryConfigTest.java Tue Jan 22 20:08:29 2013
@@ -20,15 +20,16 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * Unit test that spring configured DeadLetterChannel redelivery policy works.
  */
 @ContextConfiguration
-public class DeadLetterChannelRedeliveryConfigTest extends AbstractJUnit38SpringContextTests {
+public class DeadLetterChannelRedeliveryConfigTest extends SpringRunWithTestSupport {
 
     @Autowired
     protected ProducerTemplate template;
@@ -36,6 +37,7 @@ public class DeadLetterChannelRedelivery
     @Autowired
     protected CamelContext context;
 
+    @Test
     public void testDLCSpringConfiguredRedeliveryPolicy() throws Exception {
         MockEndpoint dead = context.getEndpoint("mock:dead", MockEndpoint.class);
         MockEndpoint result = context.getEndpoint("mock:result", MockEndpoint.class);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DefaultErrorHandlerConfigTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DefaultErrorHandlerConfigTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DefaultErrorHandlerConfigTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DefaultErrorHandlerConfigTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.config;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class DefaultErrorHandlerConfigTest extends AbstractJUnit38SpringContextTests {
+public class DefaultErrorHandlerConfigTest extends SpringRunWithTestSupport {
 
     @Autowired
     protected ProducerTemplate template;
@@ -37,10 +38,12 @@ public class DefaultErrorHandlerConfigTe
 
     protected Object expectedBody = "<hello>world!</hello>";
 
+    @Test
     public void testRouteInheritsConfiguredErrorHandler() throws Exception {
         assertReceivedMessageWithErrorHandlerValue("foo", null);
     }
 
+    @Test
     public void testRouteConfiguredErrorHandler() throws Exception {
         assertReceivedMessageWithErrorHandlerValue("bar", null);
     }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DependencyInjectCamelTemplateTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DependencyInjectCamelTemplateTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DependencyInjectCamelTemplateTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/DependencyInjectCamelTemplateTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.config;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class DependencyInjectCamelTemplateTest extends AbstractJUnit38SpringContextTests {
+public class DependencyInjectCamelTemplateTest extends SpringRunWithTestSupport {
     protected String body = "Hello";
 
     @Autowired
@@ -36,6 +37,7 @@ public class DependencyInjectCamelTempla
     @EndpointInject(uri = "mock:results")
     private MockEndpoint endpoint;
 
+    @Test
     public void testBeanHasCamelTemplateInjected() throws Exception {
         assertNotNull("Bean should be injected", bean);
         ProducerTemplate template = bean.getTemplate();

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/EndpointUriSetFromSpringTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/EndpointUriSetFromSpringTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/EndpointUriSetFromSpringTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/EndpointUriSetFromSpringTest.java Tue Jan 22 20:08:29 2013
@@ -19,25 +19,24 @@ package org.apache.camel.spring.config;
 import javax.annotation.Resource;
 
 import org.apache.camel.component.mock.MockEndpoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class EndpointUriSetFromSpringTest extends AbstractJUnit38SpringContextTests {
-    private static final transient Logger LOG = LoggerFactory.getLogger(EndpointUriSetFromSpringTest.class);
+public class EndpointUriSetFromSpringTest extends SpringRunWithTestSupport {
 
     @Resource(name = "foo:bar")
     MockEndpoint endpoint;
 
+    @Test
     public void testEndpointCreatedWithCorrectUri() throws Exception {
         assertNotNull("foo", endpoint);
         assertEquals("foo.getEndpointUri()", "foo:bar", endpoint.getEndpointUri());
-        LOG.info("Found endpoint " + endpoint + " with URI: " + endpoint.getEndpointUri());
+        log.info("Found endpoint " + endpoint + " with URI: " + endpoint.getEndpointUri());
     }
 
 }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ErrorHandlerConfigTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ErrorHandlerConfigTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ErrorHandlerConfigTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ErrorHandlerConfigTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.config;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ErrorHandlerConfigTest extends AbstractJUnit38SpringContextTests {
+public class ErrorHandlerConfigTest extends SpringRunWithTestSupport {
 
     @Autowired
     protected ProducerTemplate template;
@@ -37,10 +38,12 @@ public class ErrorHandlerConfigTest exte
 
     protected Object expectedBody = "<hello>world!</hello>";
 
+    @Test
     public void testRouteInheritsConfiguredErrorHandler() throws Exception {
         assertReceivedMessageWithErrorHandlerValue("defaultErrorHandler", "defaultErrorHandler");
     }
 
+    @Test
     public void testRouteConfiguredErrorHandler() throws Exception {
         assertReceivedMessageWithErrorHandlerValue("customErrorHandler", "customErrorHandler");
     }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/NamespacePrefixTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/NamespacePrefixTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/NamespacePrefixTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/NamespacePrefixTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.config;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class NamespacePrefixTest extends AbstractJUnit38SpringContextTests {
+public class NamespacePrefixTest extends SpringRunWithTestSupport {
     protected String body = "Hello";
 
     @Autowired
@@ -36,8 +37,7 @@ public class NamespacePrefixTest extends
     @EndpointInject(uri = "mock:results")
     private MockEndpoint endpoint;
 
-
-
+    @Test
     public void testAssertThatInjectionWorks() throws Exception {
         assertNotNull("Bean should be injected", template);
         assertNotNull("endpoint should be injected", endpoint);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAlreadyExistTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAlreadyExistTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAlreadyExistTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAlreadyExistTest.java Tue Jan 22 20:08:29 2013
@@ -18,15 +18,16 @@ package org.apache.camel.spring.config;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProducerTemplateAlreadyExistTest extends AbstractJUnit38SpringContextTests {
+public class ProducerTemplateAlreadyExistTest extends SpringRunWithTestSupport {
 
     @Autowired
     private ProducerTemplate template;
@@ -34,6 +35,7 @@ public class ProducerTemplateAlreadyExis
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testHasExistingTemplate() {
         assertNotNull("Should have injected a producer template", template);
 
@@ -44,6 +46,7 @@ public class ProducerTemplateAlreadyExis
         assertNull("Should not be able to lookup producer template", lookup2);
     }
 
+    @Test
     public void testShouldBeSingleton() {
         ProducerTemplate lookup = context.getRegistry().lookup("myTemplate", ProducerTemplate.class);
         assertNotNull("Should lookup producer template", lookup);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterBeanIdExistsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterBeanIdExistsTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterBeanIdExistsTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterBeanIdExistsTest.java Tue Jan 22 20:08:29 2013
@@ -19,24 +19,27 @@ package org.apache.camel.spring.config;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProducerTemplateAutoRegisterBeanIdExistsTest extends AbstractJUnit38SpringContextTests {
+public class ProducerTemplateAutoRegisterBeanIdExistsTest extends SpringRunWithTestSupport {
 
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testHasNoTemplate() {
         Object lookup = context.getRegistry().lookup("template");
         assertFalse("Should not be a producer template", lookup instanceof ProducerTemplate);
     }
 
+    @Test
     public void testHasConsumerTemplate() {
         Object lookup = context.getRegistry().lookup("consumerTemplate");
         assertTrue("Should be a consumer template", lookup instanceof ConsumerTemplate);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTest.java Tue Jan 22 20:08:29 2013
@@ -18,15 +18,16 @@ package org.apache.camel.spring.config;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProducerTemplateAutoRegisterTest extends AbstractJUnit38SpringContextTests {
+public class ProducerTemplateAutoRegisterTest extends SpringRunWithTestSupport {
 
     @Autowired
     private ProducerTemplate template;
@@ -34,6 +35,7 @@ public class ProducerTemplateAutoRegiste
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testHasTemplate() {
         assertNotNull("Should have injected a producer template", template);
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTwoCamelContextsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTwoCamelContextsTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTwoCamelContextsTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateAutoRegisterTwoCamelContextsTest.java Tue Jan 22 20:08:29 2013
@@ -21,14 +21,15 @@ import javax.annotation.Resource;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProducerTemplateAutoRegisterTwoCamelContextsTest extends AbstractJUnit38SpringContextTests {
+public class ProducerTemplateAutoRegisterTwoCamelContextsTest extends SpringRunWithTestSupport {
 
     @Resource(name = "camel1")
     private CamelContext context1;
@@ -36,21 +37,25 @@ public class ProducerTemplateAutoRegiste
     @Resource(name = "camel2")
     private CamelContext context2;
 
+    @Test
     public void testHasNoTemplateCamel1() {
         ProducerTemplate lookup = context1.getRegistry().lookup("template", ProducerTemplate.class);
         assertNull("Should NOT lookup producer template", lookup);
     }
 
+    @Test
     public void testHasNoTemplateCamel2() {
         ProducerTemplate lookup = context2.getRegistry().lookup("template", ProducerTemplate.class);
         assertNull("Should NOT lookup producer template", lookup);
     }
 
+    @Test
     public void testHasNoConsumerTemplateCamel1() {
         ConsumerTemplate lookup = context1.getRegistry().lookup("consumerTemplate", ConsumerTemplate.class);
         assertNull("Should NOT lookup consumer template", lookup);
     }
 
+    @Test
     public void testHasNoConsumerTemplateCamel2() {
         ConsumerTemplate lookup = context2.getRegistry().lookup("consumerTemplate", ConsumerTemplate.class);
         assertNull("Should NOT lookup consumer template", lookup);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateHasTwoTemplatesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateHasTwoTemplatesTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateHasTwoTemplatesTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateHasTwoTemplatesTest.java Tue Jan 22 20:08:29 2013
@@ -18,19 +18,21 @@ package org.apache.camel.spring.config;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProducerTemplateHasTwoTemplatesTest extends AbstractJUnit38SpringContextTests {
+public class ProducerTemplateHasTwoTemplatesTest extends SpringRunWithTestSupport {
 
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testHasTwoTemplates() {
         ProducerTemplate lookup = context.getRegistry().lookup("myTemplate", ProducerTemplate.class);
         assertNotNull("Should lookup producer template", lookup);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMaximumCacheSizeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMaximumCacheSizeTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMaximumCacheSizeTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMaximumCacheSizeTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.config;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProducerTemplateMaximumCacheSizeTest extends AbstractJUnit38SpringContextTests {
+public class ProducerTemplateMaximumCacheSizeTest extends SpringRunWithTestSupport {
 
     @Autowired
     private ProducerTemplate template;
@@ -35,6 +36,7 @@ public class ProducerTemplateMaximumCach
     @Autowired
     private CamelContext context;
 
+    @Test
     public void testTemplateMaximumCache() throws Exception {
         assertNotNull("Should have injected a producer template", template);
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMixedAutoRegisterTwoCamelContextsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMixedAutoRegisterTwoCamelContextsTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMixedAutoRegisterTwoCamelContextsTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/ProducerTemplateMixedAutoRegisterTwoCamelContextsTest.java Tue Jan 22 20:08:29 2013
@@ -21,14 +21,15 @@ import javax.annotation.Resource;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
 import org.apache.camel.impl.DefaultProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProducerTemplateMixedAutoRegisterTwoCamelContextsTest extends AbstractJUnit38SpringContextTests {
+public class ProducerTemplateMixedAutoRegisterTwoCamelContextsTest extends SpringRunWithTestSupport {
 
     @Resource(name = "camel1")
     private CamelContext context1;
@@ -36,23 +37,27 @@ public class ProducerTemplateMixedAutoRe
     @Resource(name = "camel2")
     private CamelContext context2;
 
+    @Test
     public void testHasTemplateCamel1() {
         DefaultProducerTemplate lookup = context1.getRegistry().lookup("template1", DefaultProducerTemplate.class);
         assertNotNull("Should lookup producer template", lookup);
-        assertEquals("camel1", lookup.getContext().getName());
+        assertEquals("camel1", lookup.getCamelContext().getName());
     }
 
+    @Test
     public void testHasTemplateCamel2() {
         DefaultProducerTemplate lookup = context1.getRegistry().lookup("template2", DefaultProducerTemplate.class);
         assertNotNull("Should lookup producer template", lookup);
-        assertEquals("camel2", lookup.getContext().getName());
+        assertEquals("camel2", lookup.getCamelContext().getName());
     }
 
+    @Test
     public void testHasNoConsumerTemplateCamel1() {
         ConsumerTemplate lookup = context1.getRegistry().lookup("consumerTemplate", ConsumerTemplate.class);
         assertNull("Should NOT lookup consumer template", lookup);
     }
 
+    @Test
     public void testHasNoConsumerTemplateCamel2() {
         ConsumerTemplate lookup = context2.getRegistry().lookup("consumerTemplate", ConsumerTemplate.class);
         assertNull("Should NOT lookup consumer template", lookup);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileAntPathMatcherFileFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileAntPathMatcherFileFilterTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileAntPathMatcherFileFilterTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileAntPathMatcherFileFilterTest.java Tue Jan 22 20:08:29 2013
@@ -20,17 +20,18 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.TestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Before;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class SpringFileAntPathMatcherFileFilterTest extends AbstractJUnit38SpringContextTests {
+public class SpringFileAntPathMatcherFileFilterTest extends SpringRunWithTestSupport {
     protected String expectedBody = "Godday World";
     @Autowired
     protected ProducerTemplate template;
@@ -39,6 +40,7 @@ public class SpringFileAntPathMatcherFil
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint result;
 
+    @Test
     public void testAntPatchMatherFilter() throws Exception {
         result.expectedBodiesReceived(expectedBody);
 
@@ -51,9 +53,9 @@ public class SpringFileAntPathMatcherFil
         result.assertIsSatisfied();
     }
 
-    @Override
-    protected void setUp() throws Exception {
-        TestSupport.deleteDirectory("target/antpathmatcher");
+    @Before
+    public void setUp() throws Exception {
+        deleteDirectory("target/antpathmatcher");
         super.setUp();
     }
 }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileRouteTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileRouteTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringFileRouteTest.java Tue Jan 22 20:08:29 2013
@@ -22,18 +22,19 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.TestSupport;
 import org.apache.camel.component.file.FileEndpoint;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Before;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class SpringFileRouteTest extends AbstractJUnit38SpringContextTests {
+public class SpringFileRouteTest extends SpringRunWithTestSupport {
     protected String expectedBody = "Hello World!";
     @Autowired
     protected ProducerTemplate template;
@@ -42,9 +43,10 @@ public class SpringFileRouteTest extends
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint result;
 
+    @Test
     public void testMocksAreValid() throws Exception {
         // lets check that our injected endpoint is valid
-        FileEndpoint fileEndpoint = TestSupport.assertIsInstanceOf(FileEndpoint.class, inputFile);
+        FileEndpoint fileEndpoint = assertIsInstanceOf(FileEndpoint.class, inputFile);
         assertEquals("File", new File("target/test-default-inbox"), fileEndpoint.getFile());
 
         result.expectedBodiesReceived(expectedBody);
@@ -55,9 +57,9 @@ public class SpringFileRouteTest extends
         result.assertIsSatisfied();
     }
 
-    @Override
-    protected void setUp() throws Exception {
-        TestSupport.deleteDirectory("target/test-default-inbox");
+    @Before
+    public void setUp() throws Exception {
+        deleteDirectory("target/test-default-inbox");
         super.setUp();
     }
 }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringSimpleFileNameWithQuoteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringSimpleFileNameWithQuoteTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringSimpleFileNameWithQuoteTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/file/SpringSimpleFileNameWithQuoteTest.java Tue Jan 22 20:08:29 2013
@@ -19,23 +19,25 @@ package org.apache.camel.spring.file;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.TestSupport;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Before;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class SpringSimpleFileNameWithQuoteTest extends AbstractJUnit38SpringContextTests {
+public class SpringSimpleFileNameWithQuoteTest extends SpringRunWithTestSupport {
     protected String expectedBody = "Hello World!";
     @Autowired
     protected ProducerTemplate template;
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint result;
 
+    @Test
     public void testMocksAreValid() throws Exception {
         result.expectedBodiesReceived(expectedBody);
         result.expectedHeaderReceived("foo", "\"hello.txt\" abc");
@@ -45,9 +47,9 @@ public class SpringSimpleFileNameWithQuo
         result.assertIsSatisfied();
     }
 
-    @Override
-    protected void setUp() throws Exception {
-        TestSupport.deleteDirectory("target/foo");
+    @Before
+    public void setUp() throws Exception {
+        deleteDirectory("target/foo");
         super.setUp();
     }
 }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/MyAssertions.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/MyAssertions.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/MyAssertions.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/MyAssertions.java Tue Jan 22 20:08:29 2013
@@ -16,9 +16,9 @@
  */
 package org.apache.camel.spring.mock;
 
-import junit.framework.Assert;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Assert;
 import org.springframework.beans.factory.InitializingBean;
 
 /**

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java Tue Jan 22 20:08:29 2013
@@ -20,9 +20,10 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * Tests filtering using Spring Test and XML Config
@@ -31,7 +32,7 @@ import org.springframework.test.context.
  */
 // START SNIPPET: example
 @ContextConfiguration
-public class FilterTest extends AbstractJUnit38SpringContextTests {
+public class FilterTest extends SpringRunWithTestSupport {
 
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint resultEndpoint;
@@ -40,6 +41,7 @@ public class FilterTest extends Abstract
     protected ProducerTemplate template;
 
     @DirtiesContext
+    @Test
     public void testSendMatchingMessage() throws Exception {
         String expectedBody = "<matched/>";
 
@@ -51,6 +53,7 @@ public class FilterTest extends Abstract
     }
 
     @DirtiesContext
+    @Test
     public void testSendNotMatchingMessage() throws Exception {
         resultEndpoint.expectedMessageCount(0);
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/placeholder/SimpleLanguageWithSprinPropertyPlaceholderRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/placeholder/SimpleLanguageWithSprinPropertyPlaceholderRouteTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/placeholder/SimpleLanguageWithSprinPropertyPlaceholderRouteTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/placeholder/SimpleLanguageWithSprinPropertyPlaceholderRouteTest.java Tue Jan 22 20:08:29 2013
@@ -16,24 +16,21 @@
  */
 package org.apache.camel.spring.placeholder;
 
-import java.io.File;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-
-import static org.junit.Assert.assertTrue;
 
 @ContextConfiguration
-public class SimpleLanguageWithSprinPropertyPlaceholderRouteTest extends AbstractJUnit4SpringContextTests {
+public class SimpleLanguageWithSprinPropertyPlaceholderRouteTest extends SpringRunWithTestSupport {
     
     @Produce(uri = "direct:startSimple")
     protected ProducerTemplate template;
@@ -54,7 +51,7 @@ public class SimpleLanguageWithSprinProp
         assertFileExists("target/outBoxSimple/");
     }
     
-    @Ignore(value = "dissabled because of https://jira.springsource.org/browse/SPR-7593")
+    @Ignore(value = "disabled because of https://jira.springsource.org/browse/SPR-7593")
     @Test
     @DirtiesContext
     public void replaceExpression() throws Exception {
@@ -71,8 +68,4 @@ public class SimpleLanguageWithSprinProp
         return "test-" + s + ".txt";
     }
     
-    private void assertFileExists(String filename) {
-        File file = new File(filename);
-        assertTrue("File " + filename + " should exist", file.exists());
-    }
 }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTraceTest.java Tue Jan 22 20:08:29 2013
@@ -17,19 +17,21 @@
 package org.apache.camel.spring.processor;
 
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class SpringTraceTest extends AbstractJUnit38SpringContextTests {
+public class SpringTraceTest extends SpringRunWithTestSupport {
 
     @Autowired
     protected ProducerTemplate camelTemplate;
 
+    @Test
     public void testTracing() throws Exception {
         camelTemplate.sendBody("Hello");
         camelTemplate.sendBody(1234);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/XsltTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/XsltTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/XsltTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/XsltTest.java Tue Jan 22 20:08:29 2013
@@ -19,15 +19,16 @@ package org.apache.camel.spring.processo
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class XsltTest extends AbstractJUnit38SpringContextTests {
+public class XsltTest extends SpringRunWithTestSupport {
 
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint resultEndpoint;
@@ -35,7 +36,7 @@ public class XsltTest extends AbstractJU
     @Autowired
     protected ProducerTemplate template;
 
-
+    @Test
     public void testXslt() throws Exception {
         resultEndpoint.expectedBodiesReceived("<?xml version=\"1.0\" encoding=\"UTF-8\"?><goodbye>world!</goodbye>");
 

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/MyCoolBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/MyCoolBeanTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/MyCoolBeanTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/MyCoolBeanTest.java Tue Jan 22 20:08:29 2013
@@ -16,12 +16,14 @@
  */
 package org.apache.camel.spring.produce;
 
+import org.junit.Test;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
 @ContextConfiguration
-public class MyCoolBeanTest extends AbstractJUnit38SpringContextTests {
+public class MyCoolBeanTest extends AbstractJUnit4SpringContextTests {
 
+    @Test
     public void testProducerTemplate() throws Exception {
         MyCoolBean cool = applicationContext.getBean("cool", MyCoolBean.class);
         cool.sendMsg();

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateTest.java Tue Jan 22 20:08:29 2013
@@ -19,18 +19,20 @@ package org.apache.camel.spring.produce;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 @ContextConfiguration
-public class ProduceTemplateTest extends AbstractJUnit38SpringContextTests {
+public class ProduceTemplateTest extends SpringRunWithTestSupport {
     @Autowired
     protected ProducerTemplate producer;
     
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint result;
 
+    @Test
     public void testProducerTemplate() throws Exception {
         result.expectedBodiesReceived("hello");
         // lets send a message

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateWithTwoCamelContextTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateWithTwoCamelContextTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateWithTwoCamelContextTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTemplateWithTwoCamelContextTest.java Tue Jan 22 20:08:29 2013
@@ -19,18 +19,20 @@ package org.apache.camel.spring.produce;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 @ContextConfiguration
-public class ProduceTemplateWithTwoCamelContextTest extends AbstractJUnit38SpringContextTests {
+public class ProduceTemplateWithTwoCamelContextTest extends SpringRunWithTestSupport {
     @Autowired
     protected ProducerTemplate producer;
     
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint result;
 
+    @Test
     public void testProducerTemplate() throws Exception {
         result.expectedBodiesReceived("hello");
         // lets send a message

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/produce/ProduceTest.java Tue Jan 22 20:08:29 2013
@@ -20,24 +20,27 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.camel.Produce;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class ProduceTest extends AbstractJUnit38SpringContextTests {
+public class ProduceTest extends SpringRunWithTestSupport {
     
     @Produce(uri = "direct:start")
     protected MyListener producer;
 
+    @Test
     public void testInvokeService() throws Exception {
         // lets send a message
         String actual = producer.sayHello("James");
         assertEquals("response", "Hello James", actual);
     }
     
+    @Test
     public void testInvokeServiceWithMessageHeader() throws Exception {
         Map<String, Object> headers = new HashMap<String, Object>();
         headers.put("greeter", "Nihao ");

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/SpringRemotingWithOneWayTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/SpringRemotingWithOneWayTest.java?rev=1437139&r1=1437138&r2=1437139&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/SpringRemotingWithOneWayTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/remoting/SpringRemotingWithOneWayTest.java Tue Jan 22 20:08:29 2013
@@ -22,18 +22,16 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.camel.spring.SpringRunWithTestSupport;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
 
 /**
  * @version 
  */
 @ContextConfiguration
-public class SpringRemotingWithOneWayTest extends AbstractJUnit38SpringContextTests {
-    private static final Logger LOG = LoggerFactory.getLogger(SpringRemotingWithOneWayTest.class);
+public class SpringRemotingWithOneWayTest extends SpringRunWithTestSupport {
 
     @Autowired
     protected IAsyncService myService;
@@ -41,6 +39,7 @@ public class SpringRemotingWithOneWayTes
     @EndpointInject(uri = "mock:results")
     protected MockEndpoint endpoint;
 
+    @Test
     public void testAsyncInvocation() throws Exception {
         endpoint.expectedMessageCount(1);
 
@@ -51,7 +50,7 @@ public class SpringRemotingWithOneWayTes
 
         List<Exchange> list = endpoint.getReceivedExchanges();
         for (Exchange exchange : list) {
-            LOG.info("Received: " + exchange.getIn().getBody());
+            log.info("Received: " + exchange.getIn().getBody());
             ExchangePattern pattern = exchange.getPattern();
             assertEquals("Expected pattern on exchange: " + exchange, ExchangePattern.InOnly, pattern);
         }



Mime
View raw message