camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1225168 - in /camel/trunk/examples/camel-example-loan-broker/src: main/java/org/apache/camel/loanbroker/webservice/version/Client.java test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
Date Wed, 28 Dec 2011 12:30:59 GMT
Author: davsclaus
Date: Wed Dec 28 12:30:58 2011
New Revision: 1225168

URL: http://svn.apache.org/viewvc?rev=1225168&view=rev
Log:
CAMEL-4814: Use dynamic port numbers for testing examples. CAMEL-4830: Improved and preparing
loan broker example to be split into two.

Modified:
    camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/Client.java
    camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java

Modified: camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/Client.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/Client.java?rev=1225168&r1=1225167&r2=1225168&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/Client.java
(original)
+++ camel/trunk/examples/camel-example-loan-broker/src/main/java/org/apache/camel/loanbroker/webservice/version/Client.java
Wed Dec 28 12:30:58 2011
@@ -32,7 +32,7 @@ public final class Client {
     private Client() {
     }
 
-    public LoanBrokerWS getProxy(String address) {
+    public static LoanBrokerWS getProxy(String address) {
         // Now we use the simple front API to create the client proxy
         ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
         ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
@@ -43,8 +43,7 @@ public final class Client {
     }
 
     public static void main(String[] args) {
-        Client client = new Client();
-        LoanBrokerWS loanBroker = client.getProxy(url);
+        LoanBrokerWS loanBroker = getProxy(url);
 
         StopWatch watch = new StopWatch();
         String result = loanBroker.getLoanQuote("SSN", 5000.00, 24);

Modified: camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java?rev=1225168&r1=1225167&r2=1225168&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
(original)
+++ camel/trunk/examples/camel-example-loan-broker/src/test/java/org/apache/camel/loanbroker/webservice/version/LoanBrokerWSTest.java
Wed Dec 28 12:30:58 2011
@@ -64,9 +64,7 @@ public class LoanBrokerWSTest extends Ca
 
     @Test
     public void testInvocation() throws Exception {
-        Client client = new Client();
-
-        LoanBrokerWS loanBroker = client.getProxy(url);
+        LoanBrokerWS loanBroker = Client.getProxy(url);
         String result = loanBroker.getLoanQuote("SSN", 1000.54, 10);
         log.info("Result: {}", result);
         assertTrue(result.startsWith("The best rate is [ssn:SSN bank:bank"));



Mime
View raw message