camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r785099 - in /camel/trunk/components/camel-freemarker: ./ src/test/java/org/apache/camel/component/freemarker/
Date Tue, 16 Jun 2009 07:26:42 GMT
Author: ningjiang
Date: Tue Jun 16 07:26:41 2009
New Revision: 785099

URL: http://svn.apache.org/viewvc?rev=785099&view=rev
Log:
CAMEL-1712 Upgraded the camel-freemarker JUnit version to 4.6

Modified:
    camel/trunk/components/camel-freemarker/pom.xml
    camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerBodyAsDomainObjectTest.java
    camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerConcurrentTest.java
    camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerContentCacheTest.java
    camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
    camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerSetHeaderTest.java
    camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerTest.java

Modified: camel/trunk/components/camel-freemarker/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/pom.xml?rev=785099&r1=785098&r2=785099&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/pom.xml (original)
+++ camel/trunk/components/camel-freemarker/pom.xml Tue Jun 16 07:26:41 2009
@@ -57,16 +57,9 @@
         <!-- testing -->
         <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-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerBodyAsDomainObjectTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerBodyAsDomainObjectTest.java?rev=785099&r1=785098&r2=785099&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerBodyAsDomainObjectTest.java
(original)
+++ camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerBodyAsDomainObjectTest.java
Tue Jun 16 07:26:41 2009
@@ -16,17 +16,19 @@
  */
 package org.apache.camel.component.freemarker;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 
 /**
  * Unit test with the body as a Domain object.
  *
  * @version $Revision$
  */
-public class FreemarkerBodyAsDomainObjectTest extends ContextTestSupport {
+public class FreemarkerBodyAsDomainObjectTest extends CamelTestSupport {
 
+    @Test
     public void testWithObject() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(1);

Modified: camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerConcurrentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerConcurrentTest.java?rev=785099&r1=785098&r2=785099&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerConcurrentTest.java
(original)
+++ camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerConcurrentTest.java
Tue Jun 16 07:26:41 2009
@@ -20,18 +20,21 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 
 /**
  * @version $Revision$
  */
-public class FreemarkerConcurrentTest extends ContextTestSupport {
+public class FreemarkerConcurrentTest extends CamelTestSupport {
 
+    @Test
     public void testNoConcurrentProducers() throws Exception {
         doSendMessages(1, 1);
     }
 
+    @Test
     public void testConcurrentProducers() throws Exception {
         doSendMessages(10, 5);
     }

Modified: camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerContentCacheTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerContentCacheTest.java?rev=785099&r1=785098&r2=785099&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerContentCacheTest.java
(original)
+++ camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerContentCacheTest.java
Tue Jun 16 07:26:41 2009
@@ -16,23 +16,27 @@
  */
 package org.apache.camel.component.freemarker;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Before;
+import org.junit.Test;
 
 /**
  * Unit test the cache when reloading .ftl files in the classpath
  */
-public class FreemarkerContentCacheTest extends ContextTestSupport {
+public class FreemarkerContentCacheTest extends CamelTestSupport {
 
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         super.setUp();
 
         // create a vm file in the classpath as this is the tricky reloading stuff
         template.sendBodyAndHeader("file://target/test-classes/org/apache/camel/component/freemarker?fileExist=Override",
"Hello ${headers.name}", Exchange.FILE_NAME, "hello.ftl");
     }
 
+    @Test
     public void testNotCached() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello London");
@@ -50,6 +54,7 @@
         mock.assertIsSatisfied();
     }
 
+    @Test
     public void testCached() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello London");

Modified: camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java?rev=785099&r1=785098&r2=785099&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
(original)
+++ camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerLetterTest.java
Tue Jun 16 07:26:41 2009
@@ -16,16 +16,17 @@
  */
 package org.apache.camel.component.freemarker;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 
 /**
  * Unit test for wiki documentation
  */
-public class FreemarkerLetterTest extends ContextTestSupport {
+public class FreemarkerLetterTest extends CamelTestSupport {
 
     // START SNIPPET: e1
     private Exchange createLetter() {
@@ -38,6 +39,7 @@
         return exchange;
     }
 
+    @Test
     public void testFreemarkerLetter() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMessageCount(1);

Modified: camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerSetHeaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerSetHeaderTest.java?rev=785099&r1=785098&r2=785099&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerSetHeaderTest.java
(original)
+++ camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerSetHeaderTest.java
Tue Jun 16 07:26:41 2009
@@ -21,17 +21,22 @@
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
 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;
 
 /**
  * @version $Revision$
  */
-public class FreemarkerSetHeaderTest extends SpringTestSupport {
+public class FreemarkerSetHeaderTest extends CamelSpringTestSupport {
+    @Test
     public void testSendingApple() throws Exception {
         assertRespondsWith("apple", "I am an apple");
     }
 
+    @Test
     public void testSendingOrgane() throws Exception {
         assertRespondsWith("orange", "I am an orange");
     }

Modified: camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerTest.java?rev=785099&r1=785098&r2=785099&view=diff
==============================================================================
--- camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerTest.java
(original)
+++ camel/trunk/components/camel-freemarker/src/test/java/org/apache/camel/component/freemarker/FreemarkerTest.java
Tue Jun 16 07:26:41 2009
@@ -16,21 +16,24 @@
  */
 package org.apache.camel.component.freemarker;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 
 /**
  * Freemarker unit test
  */
-public class FreemarkerTest extends ContextTestSupport {
+public class FreemarkerTest extends CamelTestSupport {
 
+    @Test
     public void testReceivesFooResponse() throws Exception {
         assertRespondsWith("foo", "<hello>foo</hello>");
     }
 
+    @Test
     public void testReceivesBarResponse() throws Exception {
         assertRespondsWith("bar", "<hello>bar</hello>");
     }



Mime
View raw message