camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r784510 [1/2] - in /camel/trunk/components/camel-cxf: ./ src/test/java/org/apache/camel/component/cxf/ src/test/java/org/apache/camel/component/cxf/converter/ src/test/java/org/apache/camel/component/cxf/cxfbean/ src/test/java/org/apache/ca...
Date Sun, 14 Jun 2009 06:14:36 GMT
Author: ningjiang
Date: Sun Jun 14 06:14:34 2009
New Revision: 784510

URL: http://svn.apache.org/viewvc?rev=784510&view=rev
Log:
CAMEL-1673 upgraded JUnit version of camel-cxf to 4.6

Removed:
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTestSupport.java
Modified:
    camel/trunk/components/camel-cxf/pom.xml
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfEndpointTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadWithFeatureRouterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageCustomizedExceptionTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMtomConsumerTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadSoapHeaderTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerRouterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapBindingTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderConvertStringTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/RouteBuilderCxfTracer.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ServiceClassRefTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/TestCamel1145Route.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/cxfbean/CxfBeanTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/AbstractSpringBeanTestSupport.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelConduitTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelDestinationTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelEndpointSpringConfigureTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelTransportTestSupport.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/CxfEndpointUtilsTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/CxfEndpointUtilsWithSpringTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java
    camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/context-camel-1145.xml

Modified: camel/trunk/components/camel-cxf/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/pom.xml?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/pom.xml (original)
+++ camel/trunk/components/camel-cxf/pom.xml Sun Jun 14 06:14:34 2009
@@ -165,18 +165,10 @@
     <!--  Test Dependencies -->
     <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>
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-http</artifactId>
@@ -236,7 +228,7 @@
 	<dependency>
 		<groupId>junit</groupId>
 		<artifactId>junit</artifactId>
-		<version>4.4</version>
+		<version>4.6</version>
 		<scope>test</scope>
 	</dependency>
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java Sun Jun 14 06:14:34 2009
@@ -24,14 +24,18 @@
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.http.HttpOperationFailedException;
 import org.apache.camel.spring.SpringCamelContext;
-import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.GreeterImpl;
 import org.apache.hello_world_soap_http.NoSuchCodeLitFault;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class CXFGreeterRouterTest extends CxfRouterTestSupport {
+public class CXFGreeterRouterTest extends CamelTestSupport {
     protected AbstractXmlApplicationContext applicationContext;
     
     private final QName serviceName = new QName("http://apache.org/hello_world_soap_http",
@@ -45,32 +49,30 @@
         + "<faultType>NoSuchCodeLitFault</faultType></testDocLitFault>"
         + "</soap:Body></soap:Envelope>";
     
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         applicationContext = createApplicationContext();
         super.setUp();
         assertNotNull("Should have created a valid spring context", applicationContext);
-
-
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         
         if (applicationContext != null) {
             applicationContext.destroy();
         }
         super.tearDown();
     }
-    @Override
-    protected void startService() {
+    
+    @BeforeClass
+    public static void startService() {
         Object implementor = new GreeterImpl();
         String address = "http://localhost:9000/SoapContext/SoapPort";
-        EndpointImpl endpoint = (EndpointImpl)Endpoint.publish(address, implementor);
-        server = endpoint.getServer();
+        Endpoint.publish(address, implementor); 
     }
 
-    
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {
         Service service = Service.create(serviceName);
         service.addPort(routerPortName, "http://schemas.xmlsoap.org/soap/",
@@ -98,6 +100,7 @@
 
     }
     
+    @Test
     public void testRoutingSOAPFault() throws Exception {
         try {
             template.sendBody("http://localhost:9003/CamelContext/RouterPort", testDocLitFaultBody);

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerTest.java Sun Jun 14 06:14:34 2009
@@ -19,17 +19,20 @@
 
 import java.util.List;
 
-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.apache.cxf.BusFactory;
 import org.apache.cxf.frontend.ClientFactoryBean;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 
-public class CxfConsumerTest extends ContextTestSupport {
+public class CxfConsumerTest extends CamelTestSupport {
     protected static final String SIMPLE_ENDPOINT_ADDRESS = "http://localhost:28080/test";
     protected static final String SIMPLE_ENDPOINT_URI = "cxf://" + SIMPLE_ENDPOINT_ADDRESS
         + "?serviceClass=org.apache.camel.component.cxf.HelloService";
@@ -38,7 +41,6 @@
     private static final String ECHO_BOOLEAN_OPERATION = "echoBoolean";
     private static final String TEST_MESSAGE = "Hello World!";
 
-
     // START SNIPPET: example
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
@@ -71,6 +73,7 @@
     }
     // END SNIPPET: example
 
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {
         ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
         ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfCustomizedExceptionTest.java Sun Jun 14 06:14:34 2009
@@ -27,19 +27,20 @@
 import org.w3c.dom.Text;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
-
+import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.commons.io.IOUtils;
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.frontend.ClientFactoryBean;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
-
-public class CxfCustomizedExceptionTest extends ContextTestSupport {
+public class CxfCustomizedExceptionTest extends CamelTestSupport {
 
     protected static final String ROUTER_ADDRESS = "http://localhost:9002/router";
     protected static final String SERVICE_CLASS = "serviceClass=org.apache.camel.component.cxf.HelloService";
@@ -61,19 +62,18 @@
     }    
 
     @Override
-    protected void setUp() throws Exception {
-        BusFactory.setDefaultBus(null);
+    @Before
+    public void setUp() throws Exception {       
         bus = BusFactory.getDefaultBus();
         super.setUp();
 
     }
 
     @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         //TODO need to shutdown the server
-        super.tearDown();
-        //bus.shutdown(true);
-        BusFactory.setDefaultBus(null);
+        super.tearDown();       
     }
     
     protected RouteBuilder createRouteBuilder() {
@@ -91,7 +91,7 @@
         return new DefaultCamelContext();
     }
 
-
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {
         ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
         ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
@@ -114,6 +114,7 @@
 
     }
     
+    @Test
     public void testInvokingServiceFromHTTPURL() throws Exception {
         URL url = new URL(ROUTER_ADDRESS);
         URLConnection urlConnection = url.openConnection();

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfEndpointTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfEndpointTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfEndpointTest.java Sun Jun 14 06:14:34 2009
@@ -17,9 +17,10 @@
 
 package org.apache.camel.component.cxf;
 
-import junit.framework.TestCase;
 import org.apache.camel.spring.SpringCamelContext;
 import org.apache.cxf.frontend.ServerFactoryBean;
+import org.junit.Assert;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
@@ -27,8 +28,9 @@
  * 
  * @version $Revision$
  */
-public class CxfEndpointTest extends TestCase {
+public class CxfEndpointTest extends Assert {
 
+    @Test
     public void testSpringCxfEndpoint() throws Exception {
         ClassPathXmlApplicationContext ctx =
             new ClassPathXmlApplicationContext(new String[]{"org/apache/camel/component/cxf/spring/CxfEndpointBeans.xml"});

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadWithFeatureRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadWithFeatureRouterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadWithFeatureRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadWithFeatureRouterTest.java Sun Jun 14 06:14:34 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.cxf;
 
+import org.junit.Before;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
@@ -25,9 +26,10 @@
  * @version $Revision$
  */
 public class CxfGreeterPayLoadWithFeatureRouterTest extends CXFGreeterRouterTest {
-
+    
+    @Before
     @Override
-    protected void setUp() throws Exception {
+    public void setUp() throws Exception {
         setUseRouteBuilder(false);
         super.setUp();
         

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageCustomizedExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageCustomizedExceptionTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageCustomizedExceptionTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMessageCustomizedExceptionTest.java Sun Jun 14 06:14:34 2009
@@ -17,13 +17,16 @@
 
 package org.apache.camel.component.cxf;
 
+import org.junit.Before;
+
 /**
  * Test for throwing the CustomizedException from Camel CXF consumer with MESSAGE DataFormat
  */
 public class CxfMessageCustomizedExceptionTest extends CxfCustomizedExceptionTest {
 
+    @Before
     @Override
-    protected void setUp() throws Exception {
+    public void setUp() throws Exception {
         routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&DataFormat=MESSAGE";
         super.setUp();
     }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMtomConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMtomConsumerTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMtomConsumerTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMtomConsumerTest.java Sun Jun 14 06:14:34 2009
@@ -27,17 +27,19 @@
 import javax.xml.ws.Holder;
 import javax.xml.ws.soap.SOAPBinding;
 
-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.cxf.mtom_feature.Hello;
 import org.apache.camel.cxf.mtom_feature.HelloService;
+import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.cxf.BusFactory;
+import org.junit.Test;
 
 
-public class CxfMtomConsumerTest extends ContextTestSupport {
+public class CxfMtomConsumerTest extends CamelTestSupport {
     protected static final String MTOM_ENDPOINT_ADDRESS = "http://localhost:9090/jaxws-mtom/hello";
     protected static final String MTOM_ENDPOINT_URI = "cxf://" + MTOM_ENDPOINT_ADDRESS
         + "?serviceClass=org.apache.camel.component.cxf.HelloImpl";        
@@ -85,6 +87,7 @@
         return ImageIO.read(getClass().getResource(name));
     }
     
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {        
 
         if (Boolean.getBoolean("java.awt.headless")) {

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java Sun Jun 14 06:14:34 2009
@@ -26,10 +26,12 @@
 import org.apache.camel.non_wrapper.UnknownPersonFault;
 import org.apache.camel.non_wrapper.types.GetPerson;
 import org.apache.camel.non_wrapper.types.GetPersonResponse;
-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 CxfNonWrapperTest extends SpringTestSupport {
+public class CxfNonWrapperTest extends CamelSpringTestSupport {
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/nonWrapperProcessor.xml");
@@ -39,7 +41,7 @@
         assertNotNull("No context found!", context);
     }
 
-
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {
 
         URL wsdlURL = getClass().getClassLoader().getResource("person-non-wrapper.wsdl");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadCustomizedExceptionTest.java Sun Jun 14 06:14:34 2009
@@ -17,12 +17,16 @@
 
 package org.apache.camel.component.cxf;
 
+import org.junit.Before;
+
 /**
  * Test for throwing the CustomizedException from Camel CXF consumer with PAYLOAD DataFormat
  */
 public class CxfPayLoadCustomizedExceptionTest extends CxfCustomizedExceptionTest {
+    
+    @Before
     @Override
-    protected void setUp() throws Exception {
+    public void setUp() throws Exception {
         routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&DataFormat=PAYLOAD";
         super.setUp();
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadSoapHeaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadSoapHeaderTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadSoapHeaderTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadSoapHeaderTest.java Sun Jun 14 06:14:34 2009
@@ -35,12 +35,17 @@
 import org.apache.camel.pizza.types.OrderPizzaType;
 import org.apache.camel.pizza.types.ToppingsListType;
 import org.apache.camel.spring.SpringCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.cxf.binding.soap.SoapHeader;
 import org.apache.cxf.jaxws.EndpointImpl;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class CxfPayLoadSoapHeaderTest extends CxfRouterTestSupport {
+public class CxfPayLoadSoapHeaderTest extends CamelTestSupport {
     protected AbstractXmlApplicationContext applicationContext; 
     private final QName serviceName = new QName("http://camel.apache.org/pizza", "PizzaService");
     
@@ -78,29 +83,29 @@
         };
     }
 
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         applicationContext = createApplicationContext();
         super.setUp();
         assertNotNull("Should have created a valid spring context", applicationContext);
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         if (applicationContext != null) {
             applicationContext.destroy();
         }
         super.tearDown();
     }
     
-    @Override
-    protected void startService() {
+    @BeforeClass
+    public static void startService() {
         Object implementor = new PizzaImpl();
         String address = "http://localhost:9023/new_pizza_service/services/PizzaService";
-        EndpointImpl endpoint = (EndpointImpl) Endpoint.publish(address, implementor);
-        server = endpoint.getServer();
+        Endpoint.publish(address, implementor);        
     }
 
+    @Test
     public void testPizzaService() {
         Pizza port = getPort();
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java Sun Jun 14 06:14:34 2009
@@ -27,6 +27,7 @@
 import org.apache.camel.Processor;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.message.Message;
+import org.junit.Test;
 
 // We use context to change the producer's endpoint address here
 public class CxfProducerContextTest extends CxfProducerTest {
@@ -37,6 +38,7 @@
     private static final String TEST_KEY = "sendSimpleMessage-test";
     private static final String TEST_VALUE = "exchange property value should get passed through request context";
 
+    @Test
     public void testExchangePropertyPropagation() throws Exception {
         Exchange exchange = sendSimpleMessage();
 
@@ -94,8 +96,4 @@
         return exchange;
     }
     
-    @Override
-    public void testInvokingJaxWsServerWithParams() throws Exception {
-        super.testInvokingJaxWsServerWithParams();
-    }
 }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerRouterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerRouterTest.java Sun Jun 14 06:14:34 2009
@@ -20,11 +20,11 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultExchange;
+import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.cxf.bus.CXFBusFactory;
@@ -33,8 +33,10 @@
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.message.MessageContentsList;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
-public class CxfProducerRouterTest extends ContextTestSupport {
+public class CxfProducerRouterTest extends CamelTestSupport {
     private static final transient Log LOG = LogFactory.getLog(CxfProducerRouterTest.class);
     private static final String SIMPLE_SERVER_ADDRESS = "http://localhost:28080/test";
     private static final String REQUEST_MESSAGE = "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
@@ -44,29 +46,17 @@
 
     private static final String ECHO_OPERATION = "echo";
     private static final String TEST_MESSAGE = "Hello World!";
-    private ServerImpl simpleServer;
+    
 
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @BeforeClass
+    public static void startServer() throws Exception {        
         // start a simple front service
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress(SIMPLE_SERVER_ADDRESS);
         svrBean.setServiceClass(HelloService.class);
         svrBean.setServiceBean(new HelloServiceImpl());
         svrBean.setBus(CXFBusFactory.getDefaultBus());
-
-        simpleServer = (ServerImpl)svrBean.create();
-        simpleServer.start();
-
-
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        if (simpleServer != null) {
-            simpleServer.stop();
-        }
+        svrBean.create();
     }
 
     protected RouteBuilder createRouteBuilder() {
@@ -78,7 +68,7 @@
         };
     }
 
-
+    @Test
     public void testInvokingSimpleServerWithParams() throws Exception {
      // START SNIPPET: sending
         Exchange senderExchange = new DefaultExchange(context, ExchangePattern.InOut);
@@ -103,6 +93,7 @@
      // END SNIPPET: sending
     }
 
+    @Test
     public void testInvokingSimpleServerWithMessageDataFormat() throws Exception {
         Exchange senderExchange = new DefaultExchange(context, ExchangePattern.InOut);
         senderExchange.getIn().setBody(REQUEST_MESSAGE);

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java Sun Jun 14 06:14:34 2009
@@ -39,11 +39,14 @@
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.hello_world_soap_http.GreeterImpl;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 /**
  * @version $Revision$
  */
-public class CxfProducerTest extends TestCase {
+public class CxfProducerTest extends Assert {
     protected static final String ECHO_OPERATION = "echo";
     protected static final String GREET_ME_OPERATION = "greetMe";
     protected static final String TEST_MESSAGE = "Hello World!";
@@ -55,39 +58,22 @@
 
     protected CamelContext camelContext = new DefaultCamelContext();
     protected ProducerTemplate template = camelContext.createProducerTemplate();
-
-    private ServerImpl simpleServer;
-    private Endpoint jaxwsEndpoint;
-
-    @Override
-    protected void setUp() throws Exception {
+    
+    @BeforeClass
+    public static void startService() throws Exception {
         // start a simple front service
         ServerFactoryBean svrBean = new ServerFactoryBean();
         svrBean.setAddress(SIMPLE_SERVER_ADDRESS);
         svrBean.setServiceClass(HelloService.class);
         svrBean.setServiceBean(new HelloServiceImpl());
         svrBean.setBus(CXFBusFactory.getDefaultBus());
-
-        simpleServer = (ServerImpl)svrBean.create();
-        simpleServer.start();
-
+        svrBean.create();
+        
         GreeterImpl greeterImpl = new GreeterImpl();
-        jaxwsEndpoint = Endpoint.publish(JAXWS_SERVER_ADDRESS, greeterImpl);
-
+        Endpoint.publish(JAXWS_SERVER_ADDRESS, greeterImpl);
     }
 
-    @Override
-    protected void tearDown() throws Exception {
-        if (simpleServer != null) {
-            simpleServer.stop();
-        }
-        if (jaxwsEndpoint != null) {
-            jaxwsEndpoint.stop();
-        }
-        BusFactory.setDefaultBus(null);
-    }
-
-
+    @Test
     public void testInvokingSimpleServerWithParams() throws Exception {
         Exchange exchange = sendSimpleMessage();
 
@@ -101,6 +87,7 @@
 
     }
 
+    @Test
     public void testInvokingAWrongServer() throws Exception {
         try {
             sendSimpleMessage(getWrongEndpointUri());
@@ -110,6 +97,7 @@
         }
     }
 
+    @Test
     public void testInvokingJaxWsServerWithParams() throws Exception {
         Exchange exchange = sendJaxWsMessage();
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRawMessageRouterTest.java Sun Jun 14 06:14:34 2009
@@ -24,6 +24,7 @@
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.util.MessageHelper;
+import org.junit.Test;
 
 public class CxfRawMessageRouterTest extends CxfSimpleRouterTest {
     private String routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&dataFormat=MESSAGE";
@@ -36,6 +37,7 @@
         };
     }
     
+    @Test
     public void testTheContentType() throws Exception {
         MockEndpoint result = getMockEndpoint("mock:result");
         result.reset();
@@ -50,6 +52,7 @@
         assertEquals("Should get the content type", result.assertExchangeReceived(0).getIn().getHeaders().get("content-type"), "text/xml; charset=utf-8");        
     }
     
+    @Test
     public void testTheContentTypeOnTheWire() throws Exception {
         Exchange exchange = template.send(ROUTER_ADDRESS,  new Processor() {
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java Sun Jun 14 06:14:34 2009
@@ -18,13 +18,18 @@
 package org.apache.camel.component.cxf;
 
 import org.apache.camel.CamelContext;
+
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.frontend.ClientFactoryBean;
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.frontend.ServerFactoryBean;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
-public class CxfSimpleRouterTest extends CxfRouterTestSupport {    
+public class CxfSimpleRouterTest extends CamelTestSupport {    
     protected static final String ROUTER_ADDRESS = "http://localhost:9000/router";
     protected static final String SERVICE_ADDRESS = "http://localhost:9002/helloworld";
     protected static final String SERVICE_CLASS = "serviceClass=org.apache.camel.component.cxf.HelloService";
@@ -32,16 +37,16 @@
     private String routerEndpointURI = "cxf://" + ROUTER_ADDRESS + "?" + SERVICE_CLASS + "&dataFormat=POJO";
     private String serviceEndpointURI = "cxf://" + SERVICE_ADDRESS + "?" + SERVICE_CLASS + "&dataFormat=POJO";
     
-    protected void startService() {
+    @BeforeClass
+    public static void startService() {       
         //start a service
         ServerFactoryBean svrBean = new ServerFactoryBean();
     
         svrBean.setAddress(SERVICE_ADDRESS);
         svrBean.setServiceClass(HelloService.class);
-        svrBean.setServiceBean(new HelloServiceImpl());
-        svrBean.setBus(bus);
+        svrBean.setServiceBean(new HelloServiceImpl());        
     
-        server = svrBean.create();
+        Server server = svrBean.create();
         server.start();
     }
     
@@ -62,14 +67,13 @@
         ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
         ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
         clientBean.setAddress(ROUTER_ADDRESS);
-        clientBean.setServiceClass(HelloService.class);
-        clientBean.setBus(bus);
+        clientBean.setServiceClass(HelloService.class);        
 
         HelloService client = (HelloService) proxyFactory.create();
         return client;
     }
 
-
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {        
         HelloService client = getCXFClient();
         String result = client.echo("hello world");
@@ -77,6 +81,7 @@
 
     }
 
+    @Test
     public void testOnwayInvocation() throws Exception {
         HelloService client = getCXFClient();
         int count = client.getInvocationCount();

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapBindingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapBindingTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapBindingTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapBindingTest.java Sun Jun 14 06:14:34 2009
@@ -25,21 +25,23 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.transform.dom.DOMSource;
 
-import junit.framework.TestCase;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.commons.io.IOUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.staxutils.StaxUtils;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class CxfSoapBindingTest extends TestCase {
+public class CxfSoapBindingTest extends Assert {
     private static final String REQUEST_STRING =
         "<testMethod xmlns=\"http://camel.apache.org/testService\"/>";
     private DefaultCamelContext context = new DefaultCamelContext();
 
-
+    
     // setup the default context for testing
+    @Test
     public void testGetCxfInMessage() throws Exception {
         HeaderFilterStrategy headerFilterStrategy = new CxfHeaderFilterStrategy();
         org.apache.camel.Exchange exchange = new DefaultExchange(context);

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderConvertStringTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderConvertStringTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderConvertStringTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderConvertStringTest.java Sun Jun 14 06:14:34 2009
@@ -17,16 +17,30 @@
 package org.apache.camel.component.cxf;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.spring.processor.SpringTestHelper;
+import org.apache.camel.Service;
+import org.apache.camel.spring.SpringCamelContext;
+import org.springframework.context.support.AbstractXmlApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class CxfSoapMessageProviderConvertStringTest extends CxfSoapMessageProviderTest {
 
     @Override
     protected CamelContext createCamelContext() throws Exception {
-        return SpringTestHelper.createSpringCamelContext(this, "org/apache/camel/component/cxf/SoapMessageProviderConvertString.xml");
-    }
-
+        setUseRouteBuilder(false);
 
+        final AbstractXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(
+            "org/apache/camel/component/cxf/SoapMessageProviderConvertString.xml");
+        setCamelContextService(new Service() {
+            public void start() throws Exception {
+                applicationContext.start();
+            }
+
+            public void stop() throws Exception {
+                applicationContext.stop();
+            }
+        });
 
+        return SpringCamelContext.springCamelContext(applicationContext);
 
+    }
 }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapMessageProviderTest.java Sun Jun 14 06:14:34 2009
@@ -21,20 +21,22 @@
 
 import javax.xml.namespace.QName;
 
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
 import org.apache.camel.wsdl_first.JaxwsTestHandler;
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.SOAPService;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 
-public class CxfSoapMessageProviderTest extends SpringTestSupport {
+public class CxfSoapMessageProviderTest extends CamelSpringTestSupport {
 
     @Override
     protected ClassPathXmlApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/SoapMessageProviderContext.xml");
     }
 
+    @Test
     public void testSOAPMessageModeDocLit() throws Exception {
         JaxwsTestHandler fromHandler = getMandatoryBean(JaxwsTestHandler.class, "fromEndpointJaxwsHandler");
         fromHandler.reset();

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSoapTest.java Sun Jun 14 06:14:34 2009
@@ -25,17 +25,18 @@
 import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMSource;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.staxutils.StaxUtils;
+import org.junit.Test;
 
-public class CxfSoapTest extends ContextTestSupport {
+public class CxfSoapTest extends CamelTestSupport {
     private static final String SOAP_STRING =
         "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
         + "<soap:Body><testMethod xmlns=\"http://camel.apache.org/testService\" />"
@@ -56,6 +57,7 @@
         };
     }
 
+    @Test
     public void testSoapConsumer() throws Exception {
         // send out the request message
         URL request = this.getClass().getResource("SoapRequest.xml");
@@ -74,6 +76,7 @@
 
     }
 
+    @Test
     public void testSoapProducer() throws Exception {
         // set out the source message
         URL request = this.getClass().getResource("RequestBody.xml");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSpringRouterTest.java Sun Jun 14 06:14:34 2009
@@ -20,14 +20,16 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.spring.SpringCamelContext;
+import org.junit.After;
+import org.junit.Before;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class CxfSpringRouterTest extends CxfSimpleRouterTest {
     protected AbstractXmlApplicationContext applicationContext;
 
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         applicationContext = createApplicationContext();
         super.setUp();
         assertNotNull("Should have created a valid spring context", applicationContext);
@@ -35,8 +37,8 @@
 
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         if (applicationContext != null) {
             applicationContext.destroy();
         }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java Sun Jun 14 06:14:34 2009
@@ -25,6 +25,8 @@
 import org.apache.camel.wsdl_first.Person;
 import org.apache.camel.wsdl_first.PersonService;
 import org.apache.camel.wsdl_first.UnknownPersonFault;
+import org.junit.Ignore;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 public class CxfWsdlFirstPayloadModeTest extends CxfWsdlFirstTest {
@@ -35,6 +37,7 @@
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/WsdlFirstBeansPayloadMode.xml");
     }
     
+    @Test
     @Override
     public void testInvokingServiceFromCXFClient() throws Exception {
 
@@ -75,7 +78,7 @@
         verifyJaxwsHandlers(fromHandler, toHandler);
     }
 
-    @Override
+    @Test
     public void testInvokingServiceWithCamelProducer() throws Exception {
         // this test does not apply to PAYLOAD mode
     }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstTest.java Sun Jun 14 06:14:34 2009
@@ -29,7 +29,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
 import org.apache.camel.wsdl_first.JaxwsTestHandler;
 import org.apache.camel.wsdl_first.Person;
 import org.apache.camel.wsdl_first.PersonImpl;
@@ -38,20 +38,11 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.endpoint.ServerImpl;
 import org.apache.cxf.jaxws.EndpointImpl;
+import org.junit.BeforeClass;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class CxfWsdlFirstTest extends SpringTestSupport {
-
-
-    private ServerImpl server;
-
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        startService();
-    }
+public class CxfWsdlFirstTest extends CamelSpringTestSupport {
 
     protected ClassPathXmlApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/WsdlFirstBeans.xml");
@@ -61,21 +52,14 @@
         assertNotNull("No context found!", context);
     }
 
-    protected void startService() {
+    @BeforeClass
+    public static void startService() {
         Object implementor = new PersonImpl();
         String address = "http://localhost:9000/PersonService/";
-        EndpointImpl endpoint = (EndpointImpl) Endpoint.publish(address, implementor);
-        server = endpoint.getServer();
+        Endpoint.publish(address, implementor);
     }
 
-    @Override
-    protected void tearDown() throws Exception {
-        if (server != null) {
-            server.stop();
-        }        
-        super.tearDown();
-        BusFactory.setDefaultBus(null);
-    }
+    
 
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
@@ -84,6 +68,7 @@
         };
     }
 
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {
 
         JaxwsTestHandler fromHandler = getMandatoryBean(JaxwsTestHandler.class, "fromEndpointJaxwsHandler");
@@ -131,6 +116,7 @@
 
     }
 
+    @Test
     @SuppressWarnings("unchecked")
     public void testInvokingServiceWithCamelProducer() throws Exception {
         Exchange exchange = sendJaxWsMessageWithHolders("hello");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/LoggingInterceptorInMessageModeTest.java Sun Jun 14 06:14:34 2009
@@ -26,16 +26,22 @@
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.junit.BeforeClass;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 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 LoggingInterceptorInMessageModeTest extends AbstractJUnit38SpringContextTests {
+public class LoggingInterceptorInMessageModeTest extends AbstractJUnit4SpringContextTests {
     
     protected static final String ROUTER_ADDRESS = "http://localhost:9000/router";
     protected static final String SERVICE_ADDRESS = "http://localhost:9002/helloworld";
@@ -43,27 +49,8 @@
     @Autowired
     protected CamelContext context;
     
-    protected Server server;
-    
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        startService();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        
-        if (server != null) {
-            server.stop();
-            server = null;
-        }
-        
-        super.tearDown();
-    }
-    
-    protected void startService() {
+    @BeforeClass
+    public static void startService() {
         //start a service
         ServerFactoryBean svrBean = new ServerFactoryBean();
     
@@ -71,10 +58,11 @@
         svrBean.setServiceClass(HelloService.class);
         svrBean.setServiceBean(new HelloServiceImpl());
     
-        server = svrBean.create();
-        server.start();
+        svrBean.create();
+        
     }
     
+    @Test
     public void testInvokingServiceFromCXFClient() throws Exception {
         
         LoggingOutInterceptor logInterceptor = null;

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/RouteBuilderCxfTracer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/RouteBuilderCxfTracer.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/RouteBuilderCxfTracer.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/RouteBuilderCxfTracer.java Sun Jun 14 06:14:34 2009
@@ -62,7 +62,7 @@
         public void process(Exchange e) throws Exception {
             GetPersonResponse gpr = new GetPersonResponse();
             gpr.setName("Bill");
-            gpr.setPersonId(e.getOut().getBody(String.class));
+            gpr.setPersonId(e.getIn().getBody(String.class));
             gpr.setSsn("Test");
 
             MessageContentsList mclOut = new MessageContentsList();

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ServiceClassRefTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ServiceClassRefTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ServiceClassRefTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/ServiceClassRefTest.java Sun Jun 14 06:14:34 2009
@@ -17,9 +17,11 @@
 package org.apache.camel.component.cxf;
 
 import org.apache.camel.CamelContext;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 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;
 
 /**
  * Unit test to verify using '#' notation to reference serviceClass.
@@ -27,11 +29,12 @@
  * @version $Revision$
  */
 @ContextConfiguration
-public class ServiceClassRefTest extends AbstractJUnit38SpringContextTests {
+public class ServiceClassRefTest extends AbstractJUnit4SpringContextTests {
 
     @Autowired
     protected CamelContext context;
     
+    @Test
     public void testServiceClassNameCreatedByRefNotation() throws Exception {
         // verify the '#' notation works
         CxfEndpoint endpoint = context.getEndpoint("cxf:bean:fromEndpoint", CxfEndpoint.class);

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/TestCamel1145Route.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/TestCamel1145Route.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/TestCamel1145Route.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/TestCamel1145Route.java Sun Jun 14 06:14:34 2009
@@ -25,12 +25,16 @@
 import org.apache.camel.non_wrapper.PersonService;
 import org.apache.camel.non_wrapper.types.GetPerson;
 import org.apache.camel.non_wrapper.types.GetPersonResponse;
+import org.junit.Test;
 import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
-@ContextConfiguration(locations = { "/org/apache/camel/component/cxf/context-camel-1145.xml" })
-public class TestCamel1145Route extends AbstractJUnit38SpringContextTests {
+import static org.junit.Assert.assertEquals;
 
+@ContextConfiguration(locations = { "/org/apache/camel/component/cxf/context-camel-1145.xml" })
+public class TestCamel1145Route extends AbstractJUnit4SpringContextTests {
+   
+    @Test
     public void testCamel1145Route() throws Exception {
         URL wsdlURL = new URL("http://localhost:9000/PersonService/?wsdl");
         PersonService ss = new PersonService(wsdlURL, new QName("http://camel.apache.org/non-wrapper", "PersonService"));

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/ConverterTest.java Sun Jun 14 06:14:34 2009
@@ -18,10 +18,12 @@
 
 import java.util.List;
 
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
 
-public class ConverterTest extends TestCase {
+public class ConverterTest extends Assert {
     
+    @Test
     public void testToClassesList() throws Exception {
         String classString = "java.lang.String, "
             + "org.apache.camel.component.cxf.converter.ConverterTest ;"

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/cxfbean/CxfBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/cxfbean/CxfBeanTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/cxfbean/CxfBeanTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/cxfbean/CxfBeanTest.java Sun Jun 14 06:14:34 2009
@@ -29,23 +29,28 @@
 import org.apache.commons.httpclient.methods.StringRequestEntity;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.io.CachedOutputStream;
+import org.junit.Before;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 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$
  */
 @ContextConfiguration
-public class CxfBeanTest extends AbstractJUnit38SpringContextTests {
+public class CxfBeanTest extends AbstractJUnit4SpringContextTests {
     private static final String PUT_REQUEST = "<Customer><name>Mary</name><id>123</id></Customer>";
     private static final String POST_REQUEST = "<Customer><name>Jack</name></Customer>";
     
     @Autowired
     protected CamelContext context;
     
-    @Override
+    @Before
     public void setUp() throws Exception {
         RouteBuilder builder = createRouteBuilder();
         context.addRoutes(builder);
@@ -66,6 +71,7 @@
         };
     }   
     
+    @Test
     public void testGetConsumer() throws Exception {
         
         URL url = new URL("http://localhost:9000/customerservice/customers/123");
@@ -81,7 +87,7 @@
 
     }
 
-    
+    @Test
     public void testPutConsumer() throws Exception {
         PutMethod put = new PutMethod("http://localhost:9000/customerservice/customers");
         RequestEntity entity = new StringRequestEntity(PUT_REQUEST, "text/xml", "ISO-8859-1");
@@ -96,6 +102,7 @@
         }
     }
     
+    @Test
     public void testPostConsumer() throws Exception {
         PostMethod post = new PostMethod("http://localhost:9000/customerservice/customers");
         post.addRequestHeader("Accept" , "text/xml");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsConsumerTest.java Sun Jun 14 06:14:34 2009
@@ -20,7 +20,6 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
@@ -28,9 +27,11 @@
 import org.apache.camel.component.cxf.CxfConstants;
 import org.apache.camel.component.cxf.jaxrs.testbean.Customer;
 import org.apache.camel.component.cxf.util.CxfUtils;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 
 
-public class CxfRsConsumerTest extends ContextTestSupport {
+public class CxfRsConsumerTest extends CamelTestSupport {
     private static final String CXF_RS_ENDPOINT_URI = "cxfrs://http://localhost:9000?resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean.CustomerService";
     
     // START SNIPPET: example
@@ -60,6 +61,7 @@
     }
     // END SNIPPET: example
     
+    @Test
     public void testGetCustomer() throws Exception {
         URL url = new URL("http://localhost:9000/customerservice/customers/126");
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointTest.java Sun Jun 14 06:14:34 2009
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.cxf.jaxrs;
 
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.component.cxf.jaxrs.testbean.CustomerService;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
 
-public class CxfRsEndpointTest extends ContextTestSupport {
+public class CxfRsEndpointTest extends CamelTestSupport {
     
+    @Test
     public void testCreateCxfRsEndpoint() throws Exception {
         CxfRsComponent component = new CxfRsComponent(context);
         CxfRsEndpoint endpoint = (CxfRsEndpoint)component.createEndpoint("cxfrs://http://localhost:9000"

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java Sun Jun 14 06:14:34 2009
@@ -22,17 +22,19 @@
 import org.apache.camel.Processor;
 import org.apache.camel.component.cxf.CxfConstants;
 import org.apache.camel.component.cxf.jaxrs.testbean.Customer;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class CxfRsProducerTest extends SpringTestSupport {
+public class CxfRsProducerTest extends CamelSpringTestSupport {
 
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {        
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/jaxrs/CxfRsSpringProducer.xml");
     }
     
+    @Test
     public void testGetConstumer() {
         // START SNIPPET: example
         Exchange exchange = template.send("direct:start", new Processor() {

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRouterTest.java Sun Jun 14 06:14:34 2009
@@ -21,17 +21,20 @@
 import java.net.URL;
 
 import org.apache.camel.component.cxf.util.CxfUtils;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
+
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class CxfRsRouterTest extends SpringTestSupport {
+public class CxfRsRouterTest extends CamelSpringTestSupport {
 
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {        
         return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/jaxrs/CxfRsSpringRouter.xml");
     }
     
+    @Test
     public void testGetCustomer() throws Exception {
         URL url = new URL("http://localhost:9000/customerservice/customers/123");
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java Sun Jun 14 06:14:34 2009
@@ -19,12 +19,15 @@
 import org.apache.camel.component.cxf.jaxrs.testbean.CustomerService;
 import org.apache.camel.component.cxf.spring.CxfRsClientFactoryBeanDefinitionParser.SpringJAXRSClientFactoryBean;
 import org.apache.camel.component.cxf.spring.CxfRsServerFactoryBeanDefinitionParser.SpringJAXRSServerFactoryBean;
-import org.apache.camel.spring.SpringTestSupport;
+import org.apache.camel.test.junit4.CamelSpringTestSupport;
+import org.junit.Test;
+
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class CxfRsSpringEndpointTest extends SpringTestSupport {
+public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
     
+    @Test
     public void testCreateCxfRsServerFactoryBean() {
         CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
         SpringJAXRSServerFactoryBean sfb = (SpringJAXRSServerFactoryBean)endpoint.createJAXRSServerFactoryBean();
@@ -34,6 +37,7 @@
         assertEquals("Get a wrong resource class", sfb.getResourceClasses().get(0), CustomerService.class);
     }
     
+    @Test
     public void testCreateCxfRsClientFactoryBean() {
         CxfRsEndpoint endpoint = resolveMandatoryEndpoint("cxfrs://bean://rsClient", CxfRsEndpoint.class);
         SpringJAXRSClientFactoryBean cfb = (SpringJAXRSClientFactoryBean)endpoint.createJAXRSClientFactoryBean();

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java Sun Jun 14 06:14:34 2009
@@ -50,9 +50,18 @@
 import org.apache.cxf.jaxb.JAXBDataBinding;
 import org.apache.cxf.message.MessageContentsList;
 import org.apache.cxf.outofband.header.OutofBandHeader;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 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;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 
 
 /**
@@ -61,7 +70,7 @@
  * @version $Revision$
  */
 @ContextConfiguration
-public class CxfMessageHeadersRelayTest extends AbstractJUnit38SpringContextTests {
+public class CxfMessageHeadersRelayTest extends AbstractJUnit4SpringContextTests {
 
     @Autowired
     protected CamelContext context;
@@ -70,17 +79,16 @@
     private Endpoint relayEndpoint;
     private Endpoint noRelayEndpoint;
     
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
+    @Before
+    public void setUp() throws Exception {        
         template = context.createProducerTemplate();
 
         relayEndpoint = Endpoint.publish("http://localhost:9090/HeaderService/", new HeaderTesterImpl());
         noRelayEndpoint = Endpoint.publish("http://localhost:7070/HeaderService/", new HeaderTesterImpl(false));
     }
 
-    @Override
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         
         if (relayEndpoint != null) {
             relayEndpoint.stop();
@@ -91,8 +99,6 @@
             noRelayEndpoint.stop();
             noRelayEndpoint = null;
         }
-
-        super.tearDown();
     }
     
     protected static void addOutOfBoundHeader(HeaderTester proxy, boolean invalid) throws JAXBException {
@@ -111,6 +117,7 @@
         
     }
     
+    @Test
     public void testInHeaderCXFClientRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -122,7 +129,7 @@
                    response.getResponseType().equals("pass"));
     }
     
-   
+    @Test
     public void testOutHeaderCXFClientRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -139,6 +146,7 @@
                    Constants.equals(Constants.OUT_HEADER_DATA, header.value));
     }
 
+    @Test
     public void testInOutHeaderCXFClientRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -154,6 +162,7 @@
                    Constants.equals(Constants.IN_OUT_RESPONSE_HEADER_DATA, header.value));
     }
 
+    @Test
     public void testInOutOfBandHeaderCXFClientRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -166,7 +175,8 @@
         assertTrue("Expected the out of band header to propagate but it didn't", 
                    response.getFirstName().equals("pass"));
     }
-    
+
+    @Test
     public void testInoutOutOfBandHeaderCXFClientRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -181,6 +191,7 @@
         validateReturnedOutOfBandHeader(proxy);
     }
 
+    @Test
     public void testOutOutOfBandHeaderCXFClientRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -193,7 +204,8 @@
                    response.getFirstName().equals("pass"));
         validateReturnedOutOfBandHeader(proxy);
     }
-    
+
+    @Test
     public void testInOutOfBandHeaderCXFClientNoRelay() throws Exception {
 
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
@@ -208,7 +220,8 @@
                    response.getFirstName().equals("pass"));
         
     }
-    
+
+    @Test
     public void testOutOutOfBandHeaderCXFClientNoRelay() throws Exception {
         
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
@@ -224,7 +237,7 @@
         validateReturnedOutOfBandHeader(proxy, false);
     }
 
-    
+    @Test
     public void testInoutOutOfBandHeaderCXFClientNoRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -239,6 +252,7 @@
         validateReturnedOutOfBandHeader(proxy, false);
     }
 
+    @Test
     public void testInHeaderCXFClientNoRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -254,7 +268,8 @@
         assertTrue("Expected in in band header *not* to propagate but it did", 
                    response.getResponseType().equals("pass"));
     }
-    
+
+    @Test
     public void testOutHeaderCXFClientNoRelay() throws Exception {
         Thread.sleep(5000);
 
@@ -275,7 +290,8 @@
         assertTrue("Expected in band response header *not* to propagate but it did",
                    header.value == null);
     }
-    
+
+    @Test
     public void testInoutHeaderCXFClientNoRelay() throws Exception {
         HeaderService s = new HeaderService(getClass().getClassLoader().getResource("soap_header.wsdl"),
                                             HeaderService.SERVICE);
@@ -295,6 +311,7 @@
                    header.value == null);
     }
 
+    @Test
     public void testMessageHeadersRelaysSpringContext() throws Exception {
         CxfEndpoint endpoint = (CxfEndpoint)context
             .getEndpoint("cxf:bean:serviceExtraRelays?headerFilterStrategy=#customMessageFilterStrategy");
@@ -307,27 +324,33 @@
                          CustomHeaderFilter.class, messageHeaderFilterMap.get(ns).getClass());
         }
     }
-    
+
+    @Test
     public void testInOutOfBandHeaderCamelTemplateDirect() throws Exception {
         doTestInOutOfBandHeaderCamelTemplate("direct:directProducer");
     }
 
+    @Test
     public void testOutOutOfBandHeaderCamelTemplateDirect() throws Exception {
         doTestOutOutOfBandHeaderCamelTemplate("direct:directProducer");
     }
-    
+
+    @Test
     public void testInOutOutOfBandHeaderCamelTemplateDirect() throws Exception {
         doTestInOutOutOfBandHeaderCamelTemplate("direct:directProducer");
     }
 
+    @Test
     public void testInOutOfBandHeaderCamelTemplateRelay() throws Exception {
         doTestInOutOfBandHeaderCamelTemplate("direct:relayProducer");
     }
-    
+
+    @Test
     public void testOutOutOfBandHeaderCamelTemplateRelay() throws Exception {
         doTestOutOutOfBandHeaderCamelTemplate("direct:relayProducer");
     }
 
+    @Test
     public void testInOutOutOfBandHeaderCamelTemplateRelay() throws Exception {
         doTestInOutOutOfBandHeaderCamelTemplate("direct:relayProducer");
     }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/AbstractSpringBeanTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/AbstractSpringBeanTestSupport.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/AbstractSpringBeanTestSupport.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/AbstractSpringBeanTestSupport.java Sun Jun 14 06:14:34 2009
@@ -17,21 +17,25 @@
 
 package org.apache.camel.component.cxf.spring;
 
-import junit.framework.TestCase;
 import org.apache.cxf.BusFactory;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public abstract class AbstractSpringBeanTestSupport extends TestCase {
+public abstract class AbstractSpringBeanTestSupport extends Assert {
     
     protected ClassPathXmlApplicationContext ctx;
     
     protected abstract String[] getApplicationContextFiles();
     
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         ctx =  new ClassPathXmlApplicationContext(getApplicationContextFiles());
     }
 
-    protected void tearDown() throws Exception {
+    @After
+    public void tearDown() throws Exception {
         ctx.close();        
     }
 

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanTest.java Sun Jun 14 06:14:34 2009
@@ -27,6 +27,7 @@
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.cxf.CxfConstants;
 import org.apache.cxf.BusFactory;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 
@@ -35,6 +36,7 @@
         return new String[]{"org/apache/camel/component/cxf/spring/CxfEndpointBeansRouter.xml"};
     }
 
+    @Test
     public void testCxfEndpointBeanDefinitionParser() {
 
         CxfEndpointBean routerEndpoint = (CxfEndpointBean)ctx.getBean("routerEndpoint");
@@ -43,6 +45,7 @@
 
     }
 
+    @Test
     public void testCxfBusConfiguration() throws Exception {
         // get the camelContext from application context
         CamelContext camelContext = (CamelContext) ctx.getBean("camel");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java Sun Jun 14 06:14:34 2009
@@ -20,6 +20,8 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.cxf.CxfEndpoint;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.junit.Before;
+import org.junit.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
@@ -29,12 +31,13 @@
  */
 public class CxfEndpointBeanWithBusTest extends CxfEndpointBeanTest {
     
-    @Override
-    protected void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
         ctx =  new ClassPathXmlApplicationContext(
                 new String[]{"org/apache/camel/component/cxf/spring/CxfEndpointBeansRouterWithBus.xml"});
     }
     
+    @Test
     public void testBusInjectedBySpring() throws Exception {
         CamelContext camelContext = (CamelContext) ctx.getBean("camel");
         CxfEndpoint endpoint = (CxfEndpoint)camelContext.getEndpoint("cxf:bean:routerEndpoint");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java Sun Jun 14 06:14:34 2009
@@ -18,6 +18,7 @@
 
 import org.apache.camel.component.cxf.jaxrs.testbean.CustomerService;
 import org.apache.camel.component.cxf.spring.CxfRsClientFactoryBeanDefinitionParser.SpringJAXRSClientFactoryBean;
+import org.junit.Test;
 
 public class CxfRsClientFactoryBeanTest extends AbstractSpringBeanTestSupport {
     
@@ -26,6 +27,7 @@
         return new String[]{"org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml"};
     }
     
+    @Test
     public void testCxfRsClientFactoryBean() {
         SpringJAXRSClientFactoryBean cfb = (SpringJAXRSClientFactoryBean) ctx.getBean("rsClient1");
         assertEquals("Get a wrong address", cfb.getAddress(), "http://localhost:9000/router");

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java Sun Jun 14 06:14:34 2009
@@ -20,6 +20,7 @@
 
 import org.apache.camel.component.cxf.jaxrs.testbean.CustomerService;
 import org.apache.camel.component.cxf.spring.CxfRsServerFactoryBeanDefinitionParser.SpringJAXRSServerFactoryBean;
+import org.junit.Test;
 
 public class CxfRsServerFactoryBeanTest extends AbstractSpringBeanTestSupport {
 
@@ -28,6 +29,7 @@
         return new String[]{"org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeans.xml"};
     }
     
+    @Test
     public void testCxfRsServerFactoryBean() {
         SpringJAXRSServerFactoryBean sfb1 = (SpringJAXRSServerFactoryBean) ctx.getBean("rsServer1");
         assertEquals("Get a wrong address", sfb1.getAddress(), "http://localhost:9000/server1");        

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelConduitTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelConduitTest.java?rev=784510&r1=784509&r2=784510&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelConduitTest.java (original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/transport/CamelConduitTest.java Sun Jun 14 06:14:34 2009
@@ -33,6 +33,7 @@
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+import org.junit.Test;
 
 public class CamelConduitTest extends CamelTransportTestSupport {
 
@@ -57,6 +58,7 @@
         return new DefaultCamelContext();
     }
 
+    @Test
     public void testCamelConduitConfiguration() throws Exception {
         QName testEndpointQNameA = new QName("http://camel.apache.org/camel-test", "portA");
         QName testEndpointQNameB = new QName("http://camel.apache.org/camel-test", "portB");
@@ -86,6 +88,7 @@
         bus.shutdown(false);
     }
 
+    @Test
     public void testPrepareSend() throws Exception {
         endpointInfo.setAddress("camel://direct:Producer");
         CamelConduit conduit = setupCamelConduit(endpointInfo, false, false);
@@ -103,6 +106,7 @@
         assertTrue("OutputStream should not be null", os != null);
     }
 
+    @Test
     public void testSendOut() throws Exception {
         endpointInfo.setAddress("camel://direct:Producer");
         CamelConduit conduit = setupCamelConduit(endpointInfo, true, false);
@@ -115,6 +119,7 @@
         // verify the endpoint get the response
     }
 
+    @Test
     public void testSendOutRunTrip() throws Exception {
         endpointInfo.setAddress("camel://direct:Producer");
         CamelConduit conduit = setupCamelConduit(endpointInfo, true, false);



Mime
View raw message