camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1303941 - in /camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro: AvroConsumerTestSupport.java AvroNettyProducerTest.java AvroNettySpringProducerTest.java AvroProducerTestSupport.java AvroTestSupport.java
Date Thu, 22 Mar 2012 18:08:04 GMT
Author: hadrian
Date: Thu Mar 22 18:08:04 2012
New Revision: 1303941

URL: http://svn.apache.org/viewvc?rev=1303941&view=rev
Log:
Update avro tests to use the junit4 based camel test support

Modified:
    camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroConsumerTestSupport.java
    camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettyProducerTest.java
    camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettySpringProducerTest.java
    camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroProducerTestSupport.java
    camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroTestSupport.java

Modified: camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroConsumerTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroConsumerTestSupport.java?rev=1303941&r1=1303940&r2=1303941&view=diff
==============================================================================
--- camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroConsumerTestSupport.java
(original)
+++ camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroConsumerTestSupport.java
Thu Mar 22 18:08:04 2012
@@ -18,20 +18,17 @@
 package org.apache.camel.component.avro;
 
 import java.io.IOException;
-import junit.framework.Assert;
 
+import junit.framework.Assert;
 import org.apache.avro.Protocol;
 import org.apache.avro.ipc.Requestor;
 import org.apache.avro.ipc.Transceiver;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.avro.generated.Key;
 import org.apache.camel.avro.generated.KeyValueProtocol;
 import org.apache.camel.avro.generated.Value;
 import org.apache.camel.avro.impl.KeyValueProtocolImpl;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 
 public abstract class AvroConsumerTestSupport extends AvroTestSupport {
@@ -42,13 +39,8 @@ public abstract class AvroConsumerTestSu
 
     protected abstract void initializeTranceiver() throws IOException;
 
-    @Before
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-    @After
-    protected void tearDown() throws Exception {
+    @Override
+    public void tearDown() throws Exception {
         super.tearDown();
         if (transceiver != null) {
             transceiver.close();

Modified: camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettyProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettyProducerTest.java?rev=1303941&r1=1303940&r2=1303941&view=diff
==============================================================================
--- camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettyProducerTest.java
(original)
+++ camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettyProducerTest.java
Thu Mar 22 18:08:04 2012
@@ -21,18 +21,14 @@ import java.net.InetSocketAddress;
 
 import org.apache.avro.ipc.NettyServer;
 import org.apache.avro.ipc.specific.SpecificResponder;
-
 import org.apache.camel.avro.generated.KeyValueProtocol;
 import org.apache.camel.builder.RouteBuilder;
 
-import org.junit.After;
-
 public class AvroNettyProducerTest extends AvroProducerTestSupport {
 
     static int avroPort = setupFreePort("avroport");
 
-    @After
-    protected RouteBuilder createRouteBuilder() throws Exception {
+    public RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {

Modified: camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettySpringProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettySpringProducerTest.java?rev=1303941&r1=1303940&r2=1303941&view=diff
==============================================================================
--- camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettySpringProducerTest.java
(original)
+++ camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroNettySpringProducerTest.java
Thu Mar 22 18:08:04 2012
@@ -19,10 +19,6 @@ package org.apache.camel.component.avro;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.spring.SpringCamelContext;
-
-import org.junit.After;
-import org.junit.Before;
-
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
@@ -31,7 +27,6 @@ public class AvroNettySpringProducerTest
     private AbstractApplicationContext applicationContext;
 
     @Override
-    @Before
     public void setUp() throws Exception {
         initializeServer();
         applicationContext = createApplicationContext();
@@ -39,7 +34,6 @@ public class AvroNettySpringProducerTest
     }
 
     @Override
-    @After
     public void tearDown() throws Exception {
         super.tearDown();
         if (applicationContext != null) {

Modified: camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroProducerTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroProducerTestSupport.java?rev=1303941&r1=1303940&r2=1303941&view=diff
==============================================================================
--- camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroProducerTestSupport.java
(original)
+++ camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroProducerTestSupport.java
Thu Mar 22 18:08:04 2012
@@ -31,8 +31,6 @@ import org.apache.camel.avro.generated.V
 import org.apache.camel.avro.impl.KeyValueProtocolImpl;
 import org.apache.camel.component.mock.MockEndpoint;
 
-import org.junit.After;
-import org.junit.Before;
 import org.junit.Test;
 
 public abstract class AvroProducerTestSupport extends AvroTestSupport {
@@ -42,14 +40,14 @@ public abstract class AvroProducerTestSu
 
     protected abstract void initializeServer() throws IOException;
 
-    @Before
-    protected void setUp() throws Exception {
+    @Override
+    public void setUp() throws Exception {
         initializeServer();
         super.setUp();
     }
 
-    @After
-    protected void tearDown() throws Exception {
+    @Override
+    public void tearDown() throws Exception {
         super.tearDown();
         if (server != null) {
             server.close();

Modified: camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroTestSupport.java?rev=1303941&r1=1303940&r2=1303941&view=diff
==============================================================================
--- camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroTestSupport.java
(original)
+++ camel/trunk/components/camel-avro/src/test/java/org/apache/camel/component/avro/AvroTestSupport.java
Thu Mar 22 18:08:04 2012
@@ -24,7 +24,7 @@ import java.io.IOException;
 import java.util.Properties;
 
 import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.CamelTestSupport;
+import org.apache.camel.test.junit4.CamelTestSupport;
 
 public class AvroTestSupport extends CamelTestSupport {
 



Mime
View raw message