svn commit r44332 - trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/esb

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

svn commit r44332 - trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/esb

Evanthika Amarasiri
Author: evanthika
Date: Fri Aug 28 02:29:26 2009
New Revision: 44332
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=44332

Log:
Common properties read fron framework.properties file

Modified:
   trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/esb/ESBAddInlineWsdlAnonSeqProxyServiceTest.java

Modified: trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/esb/ESBAddInlineWsdlAnonSeqProxyServiceTest.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/esb/ESBAddInlineWsdlAnonSeqProxyServiceTest.java?rev=44332&r1=44331&r2=44332&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/esb/ESBAddInlineWsdlAnonSeqProxyServiceTest.java (original)
+++ trunk/commons/qa/web-test-framework/esb/src/test/java/org/wso2/carbon/web/test/esb/ESBAddInlineWsdlAnonSeqProxyServiceTest.java Fri Aug 28 02:29:26 2009
@@ -35,6 +35,23 @@
     }
 
     /*
+    This method will create the Proxy Service
+     */
+    public void testProxyService() throws Exception{
+        SeleniumTestBase seleniumTestBase = new SeleniumTestBase(selenium);
+        boolean login = selenium.isTextPresent("Sign-out");
+
+        if (login) {
+            seleniumTestBase.logOutUI();
+        }
+
+        seleniumTestBase.loginToUI("admin", "admin");
+        createInlineWsdlAnonSeqProxyService();
+        seleniumTestBase.logOutUI();
+        invokeClient();
+    }
+    
+    /*
    This method will test adding of a Proxy Service with inline WSDL but with anonymous sequences
     */
     public void createInlineWsdlAnonSeqProxyService() throws Exception {
@@ -99,19 +116,21 @@
      */
     public void invokeClient() throws Exception{
         boolean stockQuoteResponse = false;
-        properties.load(new FileInputStream(".."+ File.separator+"esb"+File.separator+"src"+File.separator+"test"+File.separator+"resources"+File.separator+"esb.properties"));
-        String http_port = properties.getProperty("http.port");
-        ESBSampleClient sampleClient = new ESBSampleClient();
-
         properties.load(new FileInputStream(".." + File.separator + "commons" + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "framework.properties"));
         String context_root =  properties.getProperty("context.root");
+        String host_name = properties.getProperty("host.name");
+
+        properties.load(new FileInputStream(".."+ File.separator+"esb"+File.separator+"src"+File.separator+"test"+File.separator+"resources"+File.separator+"esb.properties"));
+        String http_port = properties.getProperty("nio.http.port");
+        ESBSampleClient sampleClient = new ESBSampleClient();
+        
         if (context_root.equals(null))
         {
-            stockQuoteResponse = sampleClient.stockQuoteClient("http://localhost:"+http_port+"/services/proxy_inline_wsdl_anon_seq", null);
+            stockQuoteResponse = sampleClient.stockQuoteClient("http://"+host_name+":"+http_port+"/services/proxy_inline_wsdl_anon_seq", null);
         }
         else
         {
-            stockQuoteResponse = sampleClient.stockQuoteClient("http://localhost:"+http_port+"/"+context_root+"/services/proxy_inline_wsdl_anon_seq", null);
+            stockQuoteResponse = sampleClient.stockQuoteClient("http://"+host_name+":"+http_port+"/"+context_root+"/services/proxy_inline_wsdl_anon_seq", null);
         }
 
         if (stockQuoteResponse){
@@ -121,21 +140,4 @@
         }
         Thread.sleep(5000);
     }
-
-    /*
-    This method will create the Proxy Service
-     */
-    public void testProxyService() throws Exception{
-        SeleniumTestBase seleniumTestBase = new SeleniumTestBase(selenium);
-        boolean login = selenium.isTextPresent("Sign-out");
-
-        if (login) {
-            seleniumTestBase.logOutUI();
-        }
-
-        seleniumTestBase.loginToUI("admin", "admin");
-        createInlineWsdlAnonSeqProxyService();
-        seleniumTestBase.logOutUI();
-        invokeClient();
-    }
 }

_______________________________________________
Commons-dev mailing list
[hidden email]
https://wso2.org/cgi-bin/mailman/listinfo/commons-dev
Loading...