camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r785899 - in /camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig: MainTest.java patterns/FilterTest.java test/JavaConfigWithNestedConfigClassTest.java test/JavaConfigWithPostProcessorTest.java
Date Thu, 18 Jun 2009 04:49:02 GMT
Author: ningjiang
Date: Thu Jun 18 04:49:02 2009
New Revision: 785899

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

Modified:
    camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/MainTest.java
    camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
    camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
    camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java

Modified: camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/MainTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/MainTest.java?rev=785899&r1=785898&r2=785899&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/MainTest.java
(original)
+++ camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/MainTest.java
Thu Jun 18 04:49:02 2009
@@ -16,14 +16,16 @@
  */
 package org.apache.camel.spring.javaconfig;
 
-import junit.framework.TestCase;
 import org.apache.camel.CamelContext;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spring.SpringCamelContext;
+import org.junit.Assert;
+import org.junit.Test;
 import org.springframework.context.ApplicationContext;
 
-public class MainTest extends TestCase {
+public class MainTest extends Assert {
+    @Test
     public void  testOptions() throws Exception {
         CamelContext context = createCamelContext(new String[]{"-bp", "org.apache.camel.spring.javaconfig"});
         runTests(context);

Modified: camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java?rev=785899&r1=785898&r2=785899&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
(original)
+++ camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java
Thu Jun 18 04:49:02 2009
@@ -22,12 +22,13 @@
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spring.javaconfig.SingleRouteCamelConfiguration;
+import org.junit.Test;
 import org.springframework.config.java.annotation.Bean;
 import org.springframework.config.java.annotation.Configuration;
 import org.springframework.config.java.test.JavaConfigContextLoader;
 import org.springframework.test.annotation.DirtiesContext;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
 /**
  * Tests filtering using Spring Test and Java Config
@@ -38,7 +39,7 @@
 @ContextConfiguration(
         locations = "org.apache.camel.spring.javaconfig.patterns.FilterTest$ContextConfig",
         loader = JavaConfigContextLoader.class)
-public class FilterTest extends AbstractJUnit38SpringContextTests {
+public class FilterTest extends AbstractJUnit4SpringContextTests {
 
     @EndpointInject(uri = "mock:result")
     protected MockEndpoint resultEndpoint;
@@ -47,6 +48,7 @@
     protected ProducerTemplate template;
 
     @DirtiesContext
+    @Test
     public void testSendMatchingMessage() throws Exception {
         String expectedBody = "<matched/>";
 
@@ -58,6 +60,7 @@
     }
 
     @DirtiesContext
+    @Test
     public void testSendNotMatchingMessage() throws Exception {
         resultEndpoint.expectedMessageCount(0);
 

Modified: camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java?rev=785899&r1=785898&r2=785899&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
(original)
+++ camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java
Thu Jun 18 04:49:02 2009
@@ -16,13 +16,16 @@
  */
 package org.apache.camel.spring.javaconfig.test;
 
+import org.junit.Test;
 import org.springframework.config.java.annotation.Bean;
 import org.springframework.config.java.annotation.Configuration;
 import org.springframework.config.java.plugin.context.AnnotationDrivenConfig;
 import org.springframework.config.java.test.JavaConfigContextLoader;
 import org.springframework.stereotype.Component;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+import static org.junit.Assert.assertEquals;
 
 /**
  * @version $Revision$
@@ -30,9 +33,10 @@
 @ContextConfiguration(locations = "org.apache.camel.spring.javaconfig.test.JavaConfigWithNestedConfigClassTest$ContextConfig",
loader = JavaConfigContextLoader.class)
 @AnnotationDrivenConfig
 @Component
-public class JavaConfigWithNestedConfigClassTest extends AbstractJUnit38SpringContextTests
implements Cheese {
+public class JavaConfigWithNestedConfigClassTest extends AbstractJUnit4SpringContextTests
implements Cheese {
     private boolean doCheeseCalled;
 
+    @Test
     public void testPostProcessorInjectsMe() throws Exception {
         assertEquals("doCheese() should be called", true, doCheeseCalled);
 

Modified: camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java?rev=785899&r1=785898&r2=785899&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
(original)
+++ camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithPostProcessorTest.java
Thu Jun 18 04:49:02 2009
@@ -16,11 +16,14 @@
  */
 package org.apache.camel.spring.javaconfig.test;
 
+import org.junit.Test;
 import org.springframework.config.java.plugin.context.AnnotationDrivenConfig;
 import org.springframework.config.java.test.JavaConfigContextLoader;
 import org.springframework.stereotype.Component;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+import static org.junit.Assert.assertEquals;
 
 /**
  * @version $Revision$
@@ -28,9 +31,10 @@
 @ContextConfiguration(locations = "org.apache.camel.spring.javaconfig.test.MyConfig", loader
= JavaConfigContextLoader.class)
 @AnnotationDrivenConfig
 @Component
-public class JavaConfigWithPostProcessorTest extends AbstractJUnit38SpringContextTests implements
Cheese {
+public class JavaConfigWithPostProcessorTest extends AbstractJUnit4SpringContextTests implements
Cheese {
     private boolean doCheeseCalled;
 
+    @Test
     public void testPostProcessorInjectsMe() throws Exception {
         assertEquals("doCheese() should be called", true, doCheeseCalled);
 



Mime
View raw message