You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2011/12/27 23:10:27 UTC

svn commit: r1225028 - in /camel/trunk/examples: camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java

Author: hadrian
Date: Tue Dec 27 22:10:27 2011
New Revision: 1225028

URL: http://svn.apache.org/viewvc?rev=1225028&view=rev
Log:
Checkstyle fixes

Modified:
    camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
    camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java

Modified: camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=1225028&r1=1225027&r2=1225028&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java (original)
+++ camel/trunk/examples/camel-example-cxf-proxy/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java Tue Dec 27 22:10:27 2011
@@ -19,13 +19,14 @@ package org.apache.camel.example.reporti
 import java.io.File;
 import java.io.FileOutputStream;
 
+import junit.framework.Assert;
+
 import org.apache.camel.spring.Main;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import static junit.framework.Assert.assertEquals;
 
 /**
  * Unit test of our routes
@@ -33,7 +34,7 @@ import static junit.framework.Assert.ass
 public class ReportIncidentRoutesTest {
 
     // should be the same address as we have in our route
-    private static String URL;
+    private static String url;
 
     protected Main main;
 
@@ -53,7 +54,7 @@ public class ReportIncidentRoutesTest {
         fos.write(s2.getBytes());
         fos.close();
 
-        URL = "http://localhost:" + port + "/camel-example-cxf-proxy/webservices/incident";
+        url = "http://localhost:" + port + "/camel-example-cxf-proxy/webservices/incident";
     }
 
     protected void startCamel() throws Exception {
@@ -76,7 +77,7 @@ public class ReportIncidentRoutesTest {
         // we use CXF to create a client for us as its easier than JAXWS and works
         JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
         factory.setServiceClass(ReportIncidentEndpoint.class);
-        factory.setAddress(URL);
+        factory.setAddress(url);
         return (ReportIncidentEndpoint) factory.create();
     }
 
@@ -110,6 +111,6 @@ public class ReportIncidentRoutesTest {
         OutputReportIncident out = client.reportIncident(input);
 
         // assert we got a OK back
-        assertEquals("OK;456", out.getCode());
+        Assert.assertEquals("OK;456", out.getCode());
     }
 }

Modified: camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java?rev=1225028&r1=1225027&r2=1225028&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java (original)
+++ camel/trunk/examples/camel-example-osgi-rmi/src/test/java/org/apache/camel/example/osgi/RmiTest.java Tue Dec 27 22:10:27 2011
@@ -36,14 +36,14 @@ import org.springframework.context.suppo
  */
 public class RmiTest extends CamelSpringTestSupport {
     
-    private static int PORT;
+    private static int port;
 
     @BeforeClass
     public static void setupFreePort() throws Exception {
         // find a free port number from 9100 onwards, and write that in the custom.properties file
         // which we will use for the unit tests, to avoid port number in use problems
-        PORT = AvailablePortFinder.getNextAvailable(9100);
-        String s = "port=" + PORT;
+        port = AvailablePortFinder.getNextAvailable(9100);
+        String s = "port=" + port;
 
         File custom = new File("target/custom.properties");
         FileOutputStream fos = new FileOutputStream(custom);
@@ -63,8 +63,8 @@ public class RmiTest extends CamelSpring
         ProducerTemplate myTemplate = myContext.createProducerTemplate();
         myTemplate.start();
         try {
-            System.out.println("Calling on port " + PORT);
-            String out = myTemplate.requestBody("rmi://localhost:" + PORT + "/helloServiceBean", "Camel", String.class);
+            System.out.println("Calling on port " + port);
+            String out = myTemplate.requestBody("rmi://localhost:" + port + "/helloServiceBean", "Camel", String.class);
             assertEquals("Hello Camel", out);
         } finally {
             myTemplate.stop();