camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r785889 - in /camel/trunk/components/camel-spring-integration: ./ src/test/java/org/apache/camel/component/spring/integration/ src/test/java/org/apache/camel/component/spring/integration/adapter/
Date Thu, 18 Jun 2009 03:48:21 GMT
Author: ningjiang
Date: Thu Jun 18 03:48:21 2009
New Revision: 785889

URL: http://svn.apache.org/viewvc?rev=785889&view=rev
Log:
CAMEL-1712 Upgraded the camel-spring-integration to JUnit4

Modified:
    camel/trunk/components/camel-spring-integration/pom.xml
    camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationOneWayConsumerTest.java
    camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationProducerTest.java
    camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationTwoWayConsumerTest.java
    camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelSourceAdapterTest.java
    camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
    camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/ConfigurationTest.java

Modified: camel/trunk/components/camel-spring-integration/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/pom.xml?rev=785889&r1=785888&r2=785889&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/pom.xml (original)
+++ camel/trunk/components/camel-spring-integration/pom.xml Thu Jun 18 03:48:21 2009
@@ -152,16 +152,9 @@
     </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <type>test-jar</type>
+      <artifactId>camel-test</artifactId>      
       <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-spring</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
+    </dependency>    
     <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>

Modified: camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationOneWayConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationOneWayConsumerTest.java?rev=785889&r1=785888&r2=785889&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationOneWayConsumerTest.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationOneWayConsumerTest.java
Thu Jun 18 03:48:21 2009
@@ -18,15 +18,17 @@
 package org.apache.camel.component.spring.integration;
 
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.integration.core.MessageChannel;
 import org.springframework.integration.message.StringMessage;
 
 
-public class SpringIntegrationOneWayConsumerTest extends SpringTestSupport {
+public class SpringIntegrationOneWayConsumerTest extends CamelSpringTestSupport {
     private static final String MESSAGE_BODY = "hello world";
 
+    @Test
     public void testSendingOneWayMessage() throws Exception {
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         resultEndpoint.expectedBodiesReceived(MESSAGE_BODY);

Modified: camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationProducerTest.java?rev=785889&r1=785888&r2=785889&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationProducerTest.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationProducerTest.java
Thu Jun 18 03:48:21 2009
@@ -17,20 +17,23 @@
 package org.apache.camel.component.spring.integration;
 
 import org.apache.camel.ExchangePattern;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class SpringIntegrationProducerTest extends SpringTestSupport {
+public class SpringIntegrationProducerTest extends CamelSpringTestSupport {
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/spring/integration/producer.xml");
     }
 
+    @Test
     public void testSendingTwoWayMessage() throws Exception {
         String result = (String) template.sendBody("direct:twowayMessage", ExchangePattern.InOut,
"Willem");
         assertEquals("Can't get the right response", result, "Hello Willem");
     }
     
+    @Test
     public void testSendingOneWayMessage() throws Exception {
         template.sendBody("direct:onewayMessage", "Greet");
         HelloWorldService service = (HelloWorldService)applicationContext.getBean("helloService");

Modified: camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationTwoWayConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationTwoWayConsumerTest.java?rev=785889&r1=785888&r2=785889&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationTwoWayConsumerTest.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/SpringIntegrationTwoWayConsumerTest.java
Thu Jun 18 03:48:21 2009
@@ -20,7 +20,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.integration.channel.AbstractPollableChannel;
 import org.springframework.integration.channel.DirectChannel;
@@ -31,9 +32,10 @@
 import org.springframework.integration.message.MessageHandler;
 
 
-public class SpringIntegrationTwoWayConsumerTest extends SpringTestSupport {
+public class SpringIntegrationTwoWayConsumerTest extends CamelSpringTestSupport {
     private static final String MESSAGE_BODY = "Request message";    
 
+    @Test
     public void testSendingTwoWayMessage() throws Exception {
         
         MessageChannel requestChannel = (MessageChannel) applicationContext.getBean("requestChannel");

Modified: camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelSourceAdapterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelSourceAdapterTest.java?rev=785889&r1=785888&r2=785889&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelSourceAdapterTest.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelSourceAdapterTest.java
Thu Jun 18 03:48:21 2009
@@ -18,14 +18,16 @@
 
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.component.spring.integration.HelloWorldService;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.integration.channel.DirectChannel;
 import org.springframework.integration.channel.PollableChannel;
 import org.springframework.integration.core.Message;
 import org.springframework.integration.message.MessageHandler;
 
-public class CamelSourceAdapterTest extends SpringTestSupport {
+public class CamelSourceAdapterTest extends CamelSpringTestSupport {
+    @Test
     public void testSendingOneWayMessage() throws Exception {
         DirectChannel channelA = (DirectChannel) applicationContext.getBean("channelA");
         channelA.subscribe(new MessageHandler() {
@@ -36,6 +38,7 @@
         template.sendBody("direct:OneWay", "Willem");
     }
 
+    @Test
     public void testSendingTwoWayMessage() throws Exception {
         String result = (String) template.sendBody("direct:TwoWay", ExchangePattern.InOut,
"Willem");
         assertEquals("Can't get the right response", result, "Hello Willem");

Modified: camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java?rev=785889&r1=785888&r2=785889&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
Thu Jun 18 03:48:21 2009
@@ -20,7 +20,8 @@
 import java.util.Map;
 
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.integration.channel.DirectChannel;
 import org.springframework.integration.channel.PollableChannel;
@@ -31,9 +32,10 @@
 import org.springframework.integration.message.MessageHandler;
 import org.springframework.integration.message.StringMessage;
 
-public class CamelTargetAdapterTest extends SpringTestSupport {
+public class CamelTargetAdapterTest extends CamelSpringTestSupport {
     private static final String MESSAGE_BODY = "hello world";
 
+    @Test
     public void testSendingOneWayMessage() throws Exception {
         MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
         resultEndpoint.expectedBodiesReceived(MESSAGE_BODY);
@@ -42,6 +44,7 @@
         resultEndpoint.assertIsSatisfied();
     }
 
+    @Test
     public void testSendingTwoWayMessage() throws Exception {
 
         MessageChannel requestChannel = (MessageChannel) applicationContext.getBean("channelB");
@@ -57,6 +60,7 @@
         requestChannel.send(message);
     }
 
+    @Test
     public void testSendingTwoWayMessageWithMessageAddress() throws Exception {
 
         MessageChannel requestChannel = (MessageChannel) applicationContext.getBean("channelD");

Modified: camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/ConfigurationTest.java?rev=785889&r1=785888&r2=785889&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/ConfigurationTest.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/ConfigurationTest.java
Thu Jun 18 03:48:21 2009
@@ -17,13 +17,16 @@
 package org.apache.camel.component.spring.integration.adapter;
 
 import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class ConfigurationTest extends TestCase {
+public class ConfigurationTest extends Assert {
     private AbstractXmlApplicationContext context;
 
 
+    @Test
     public void testCamelSourceEndpoint() throws Exception {
         context =
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/camel/component/spring/integration/adapter/CamelSource.xml"});
@@ -39,6 +42,7 @@
 
     }
 
+    @Test
     public void testCamelTragetEndpoint() throws Exception {
         context =
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml"});



Mime
View raw message