camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r785097 - in /camel/trunk/components/camel-flatpack: ./ src/test/java/org/apache/camel/component/flatpack/
Date Tue, 16 Jun 2009 07:23:11 GMT
Author: ningjiang
Date: Tue Jun 16 07:23:10 2009
New Revision: 785097

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

Modified:
    camel/trunk/components/camel-flatpack/pom.xml
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithNoDescriptorTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithUnmarshalTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthWithUnmarshalTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackDelimitedDataFormatTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthDataFormatTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthWithHeaderAndTrailerDataFormatTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/HeaderAndTrailerTest.java
    camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/NoSplitRowsTest.java

Modified: camel/trunk/components/camel-flatpack/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/pom.xml?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/pom.xml (original)
+++ camel/trunk/components/camel-flatpack/pom.xml Tue Jun 16 07:23:10 2009
@@ -68,9 +68,8 @@
     </dependency>
     <dependency>
       <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <scope>test</scope>
-      <type>test-jar</type>
+      <artifactId>camel-test</artifactId>
+      <scope>test</scope>      
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedTest.java
Tue Jun 16 07:23:10 2009
@@ -26,14 +26,18 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
 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;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * @version $Revision$
  */
 @ContextConfiguration
-public class DelimitedTest extends AbstractJUnit38SpringContextTests {
+public class DelimitedTest extends AbstractJUnit4SpringContextTests {
     private static final transient Log LOG = LogFactory.getLog(FixedLengthTest.class);
 
     @EndpointInject(uri = "mock:results")
@@ -41,6 +45,7 @@
 
     protected String[] expectedItemDesc = {"SOME VALVE", "AN ENGINE", "A BELT", "A BOLT"};
 
+    @Test
     public void testCamel() throws Exception {
         results.expectedMessageCount(4);
         results.assertIsSatisfied();

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithNoDescriptorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithNoDescriptorTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithNoDescriptorTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithNoDescriptorTest.java
Tue Jun 16 07:23:10 2009
@@ -26,14 +26,18 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
 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;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * @version $Revision$
  */
 @ContextConfiguration
-public class DelimitedWithNoDescriptorTest extends AbstractJUnit38SpringContextTests {
+public class DelimitedWithNoDescriptorTest extends AbstractJUnit4SpringContextTests {
     private static final transient Log LOG = LogFactory.getLog(FixedLengthTest.class);
 
     @EndpointInject(uri = "mock:results")
@@ -41,6 +45,7 @@
 
     protected String[] expectedItemDesc = {"James", "Claus"};
 
+    @Test
     public void testCamel() throws Exception {
         results.expectedMessageCount(2);
         results.assertIsSatisfied();

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithUnmarshalTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithUnmarshalTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithUnmarshalTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/DelimitedWithUnmarshalTest.java
Tue Jun 16 07:23:10 2009
@@ -26,14 +26,18 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
 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;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * @version $Revision$
  */
 @ContextConfiguration
-public class DelimitedWithUnmarshalTest extends AbstractJUnit38SpringContextTests {
+public class DelimitedWithUnmarshalTest extends AbstractJUnit4SpringContextTests {
     private static final transient Log LOG = LogFactory.getLog(FixedLengthTest.class);
 
     @EndpointInject(uri = "mock:results")
@@ -41,6 +45,7 @@
 
     protected String[] expectedItemDesc = {"SOME VALVE", "AN ENGINE", "A BELT", "A BOLT"};
 
+    @Test
     public void testCamel() throws Exception {
         results.expectedMessageCount(4);
         results.assertIsSatisfied();

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthTest.java
Tue Jun 16 07:23:10 2009
@@ -26,14 +26,17 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
 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;
+import static org.junit.Assert.assertNotNull;
 /**
  * @version $Revision$
  */
 @ContextConfiguration
-public class FixedLengthTest extends AbstractJUnit38SpringContextTests {
+public class FixedLengthTest extends AbstractJUnit4SpringContextTests {
     private static final transient Log LOG = LogFactory.getLog(FixedLengthTest.class);
 
     @EndpointInject(uri = "mock:results")
@@ -41,6 +44,7 @@
 
     protected String[] expectedFirstName = {"JOHN", "JIMMY", "JANE", "FRED"};
 
+    @Test
     public void testCamel() throws Exception {
         results.expectedMessageCount(4);
         results.assertIsSatisfied();

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthWithUnmarshalTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthWithUnmarshalTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthWithUnmarshalTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FixedLengthWithUnmarshalTest.java
Tue Jun 16 07:23:10 2009
@@ -26,14 +26,17 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
 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;
+import static org.junit.Assert.assertNotNull;
 /**
  * @version $Revision$
  */
 @ContextConfiguration
-public class FixedLengthWithUnmarshalTest extends AbstractJUnit38SpringContextTests {
+public class FixedLengthWithUnmarshalTest extends AbstractJUnit4SpringContextTests {
     private static final transient Log LOG = LogFactory.getLog(FixedLengthTest.class);
 
     @EndpointInject(uri = "mock:results")
@@ -41,6 +44,7 @@
 
     protected String[] expectedFirstName = {"JOHN", "JIMMY", "JANE", "FRED"};
 
+    @Test
     public void testCamel() throws Exception {
         results.expectedMessageCount(4);
         results.assertIsSatisfied();

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackDelimitedDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackDelimitedDataFormatTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackDelimitedDataFormatTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackDelimitedDataFormatTest.java
Tue Jun 16 07:23:10 2009
@@ -22,17 +22,19 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.converter.IOConverter;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 import org.springframework.core.io.ClassPathResource;
 
 /**
  * Unit test for delimited DataFormat.
  */
-public class FlatpackDelimitedDataFormatTest extends ContextTestSupport {
+public class FlatpackDelimitedDataFormatTest extends CamelTestSupport {
 
+    @Test
     public void testUnmarshal() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:unmarshal");
         // by default we get on big message
@@ -50,6 +52,7 @@
         assertEquals("SOME VALVE", row.get("ITEM_DESC"));
     }
 
+    @Test
     public void testMarshalWithDefinition() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:marshal");
         // by default we get on big message
@@ -74,6 +77,7 @@
         assertMockEndpointsSatisfied();
     }
 
+    @Test
     public void testMarshalNoDefinition() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:marshal2");
         // by default we get on big message

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthDataFormatTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthDataFormatTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthDataFormatTest.java
Tue Jun 16 07:23:10 2009
@@ -22,17 +22,19 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.converter.IOConverter;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 import org.springframework.core.io.ClassPathResource;
 
 /**
  * Unit test for fixed length DataFormat.
  */
-public class FlatpackFixedLengthDataFormatTest extends ContextTestSupport {
+public class FlatpackFixedLengthDataFormatTest extends CamelTestSupport {
 
+    @Test
     public void testUnmarshal() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:unmarshal");
         // by default we get on big message
@@ -50,6 +52,7 @@
         assertEquals("JOHN", row.get("FIRSTNAME"));
     }
 
+    @Test
     public void testMarshalWithDefinition() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:marshal");
         // by default we get on big message

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthWithHeaderAndTrailerDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthWithHeaderAndTrailerDataFormatTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthWithHeaderAndTrailerDataFormatTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/FlatpackFixedLengthWithHeaderAndTrailerDataFormatTest.java
Tue Jun 16 07:23:10 2009
@@ -19,17 +19,19 @@
 import java.io.File;
 import java.util.Map;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.converter.IOConverter;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 import org.springframework.core.io.ClassPathResource;
 
 /**
  * Unit test for fixed length DataFormat.
  */
-public class FlatpackFixedLengthWithHeaderAndTrailerDataFormatTest extends ContextTestSupport
{
+public class FlatpackFixedLengthWithHeaderAndTrailerDataFormatTest extends CamelTestSupport
{
 
+    @Test
     public void testUnmarshal() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:unmarshal");
         // by default we get on big message

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/HeaderAndTrailerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/HeaderAndTrailerTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/HeaderAndTrailerTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/HeaderAndTrailerTest.java
Tue Jun 16 07:23:10 2009
@@ -26,14 +26,18 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
 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;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * @version $Revision$
  */
 @ContextConfiguration
-public class HeaderAndTrailerTest extends AbstractJUnit38SpringContextTests {
+public class HeaderAndTrailerTest extends AbstractJUnit4SpringContextTests {
     private static final transient Log LOG = LogFactory.getLog(HeaderAndTrailerTest.class);
 
     @EndpointInject(uri = "mock:results")
@@ -41,6 +45,7 @@
 
     protected String[] expectedFirstName = {"JOHN", "JIMMY", "JANE", "FRED"};
 
+    @Test
     public void testHeaderAndTrailer() throws Exception {
         results.expectedMessageCount(6);
         results.assertIsSatisfied();

Modified: camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/NoSplitRowsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/NoSplitRowsTest.java?rev=785097&r1=785096&r2=785097&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/NoSplitRowsTest.java
(original)
+++ camel/trunk/components/camel-flatpack/src/test/java/org/apache/camel/component/flatpack/NoSplitRowsTest.java
Tue Jun 16 07:23:10 2009
@@ -23,8 +23,12 @@
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.junit.Test;
 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;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Unit test to verify that splitRows=false option.
@@ -32,7 +36,7 @@
  * @version $Revision$
  */
 @ContextConfiguration
-public class NoSplitRowsTest extends AbstractJUnit38SpringContextTests {
+public class NoSplitRowsTest extends AbstractJUnit4SpringContextTests {
     
     private static final transient Log LOG = LogFactory.getLog(NoSplitRowsTest.class);
 
@@ -41,6 +45,7 @@
 
     protected String[] expectedFirstName = {"JOHN", "JIMMY", "JANE", "FRED"};
 
+    @Test
     public void testHeaderAndTrailer() throws Exception {
         results.expectedMessageCount(1);
         results.message(0).body().isInstanceOf(List.class);



Mime
View raw message