[wsas-java-dev] svn commit r2462 - in trunk/wsas/java/modules: admin/test/org/wso2/wsas/admin/service/logging integration/test/org/wso2/codegen/service

svn at wso2.org svn at wso2.org
Thu May 10 22:51:19 PDT 2007


Author: saminda
Date: Thu May 10 22:50:59 2007
New Revision: 2462

Modified:
   trunk/wsas/java/modules/admin/test/org/wso2/wsas/admin/service/logging/LoggingServiceTest.java
   trunk/wsas/java/modules/integration/test/org/wso2/codegen/service/WSDLInfoServiceTest.java
Log:
Fixing test cases to latest changes 


Modified: trunk/wsas/java/modules/admin/test/org/wso2/wsas/admin/service/logging/LoggingServiceTest.java
==============================================================================
--- trunk/wsas/java/modules/admin/test/org/wso2/wsas/admin/service/logging/LoggingServiceTest.java	(original)
+++ trunk/wsas/java/modules/admin/test/org/wso2/wsas/admin/service/logging/LoggingServiceTest.java	Thu May 10 22:50:59 2007
@@ -17,10 +17,7 @@
 
 import junit.framework.TestCase;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.OperationContext;
-import org.apache.axis2.description.InOutAxisOperation;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.log4j.Layout;
 import org.apache.log4j.Level;
@@ -45,14 +42,8 @@
 
         ConfigurationContext configCtx = new ConfigurationContext(new AxisConfiguration());
 
-        MessageContext msgCtx = ContextFactory.createMessageContext(configCtx);
+        MessageContext msgCtx = configCtx.createMessageContext();
 
-        OperationContext opctx =
-                ContextFactory.createOperationContext(new InOutAxisOperation(), null);
-
-        opctx.addMessageContext(msgCtx);
-        msgCtx.setOperationContext(opctx);
-        msgCtx.setConfigurationContext(configCtx);
         MessageContext.setCurrentMessageContext(msgCtx);
         circQ = new CircularBuffer(200);
 

Modified: trunk/wsas/java/modules/integration/test/org/wso2/codegen/service/WSDLInfoServiceTest.java
==============================================================================
--- trunk/wsas/java/modules/integration/test/org/wso2/codegen/service/WSDLInfoServiceTest.java	(original)
+++ trunk/wsas/java/modules/integration/test/org/wso2/codegen/service/WSDLInfoServiceTest.java	Thu May 10 22:50:59 2007
@@ -23,22 +23,45 @@
 
 public class WSDLInfoServiceTest extends AbstractTestCase {
 
-    public void testListServicesAndPorts() throws Exception {
+    EndpointReference epr;
 
-        EndpointReference epr = new EndpointReference("http://" +
-                                                      NetworkUtils.getLocalHostname() + ":" +
-                                                      (TestConstants.TESTING_PORT) +
-                                                      "/" + ServerConstants.SERVICE_PATH + "/" +
-                                                      "WSDLInfoService");
+    public void setUp() throws java.lang.Exception {
+        epr = new EndpointReference("http://" +
+                                    NetworkUtils.getLocalHostname() + ":" +
+                                    (TestConstants.TESTING_PORT) +
+                                    "/" + ServerConstants.SERVICE_PATH + "/" +
+                                    "WSDLInfoService");
         testConnect(epr);
         removeProperties();
+    }
+
+    public void testListServicesAndPortsWSDL11() throws Exception {
+        WSDLInfoServiceStub client = new WSDLInfoServiceStub(null, epr.getAddress());
+
+        WSDLInfoServiceStub.ListServicesAndPorts req =
+                new WSDLInfoServiceStub.ListServicesAndPorts();
+        WSDLInfoServiceStub.WSDLRestriction wsdlRestriction =
+                WSDLInfoServiceStub.WSDLRestriction.value1;
+        req.setServiceName("WSDLInfoService");
+        req.setWsdlVersion(wsdlRestriction);
+
+        WSDLInfoServiceStub.ListServicesAndPortsResponse response =
+                client.listServicesAndPorts(req);
+        assertNotNull(response);
+    }
 
+    public void testtestListServicesAndPortsWSDL12() throws Exception {
         WSDLInfoServiceStub client = new WSDLInfoServiceStub(null, epr.getAddress());
 
-        WSDLInfoServiceStub.ListServicesAndPorts req = new WSDLInfoServiceStub.ListServicesAndPorts();
+        WSDLInfoServiceStub.ListServicesAndPorts req =
+                new WSDLInfoServiceStub.ListServicesAndPorts();
+        WSDLInfoServiceStub.WSDLRestriction wsdlRestriction =
+                WSDLInfoServiceStub.WSDLRestriction.value2;
         req.setServiceName("WSDLInfoService");
+        req.setWsdlVersion(wsdlRestriction);
 
-        WSDLInfoServiceStub.ListServicesAndPortsResponse response = client.listServicesAndPorts(req);
+        WSDLInfoServiceStub.ListServicesAndPortsResponse response =
+                client.listServicesAndPorts(req);
         assertNotNull(response);
     }
 }




More information about the Wsas-java-dev mailing list