You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sc...@apache.org on 2006/06/21 16:44:14 UTC

svn commit: r415999 - in /webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws: DOMSourceDispatch.java DispatchTestSuite.java SAXSourceDispatch.java SourceDispatch.java StringDispatch.java framework/JAXWSTest.java

Author: scheu
Date: Wed Jun 21 07:44:13 2006
New Revision: 415999

URL: http://svn.apache.org/viewvc?rev=415999&view=rev
Log:
AXIS2-832 Commit
This patch is provide by Jeff Barrett.
I have validated the fix.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DOMSourceDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DispatchTestSuite.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SAXSourceDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SourceDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/StringDispatch.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DOMSourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DOMSourceDispatch.java?rev=415999&r1=415998&r2=415999&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DOMSourceDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DOMSourceDispatch.java Wed Jun 21 07:44:13 2006
@@ -2,7 +2,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.StringWriter;
-import java.net.URL;
 import java.util.Map;
 import java.util.concurrent.Future;
 
@@ -23,8 +22,6 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.jaxws.CallbackHandler;
-import org.apache.axis2.jaxws.framework.StartServer;
-import org.apache.axis2.jaxws.framework.StopServer;
 import org.w3c.dom.Document;
 
 public class DOMSourceDispatch extends TestCase{
@@ -36,20 +33,6 @@
 	private String xmlString = "<ns1:echoString xmlns:ns1=\"http://test\"><ns1:input xmlns=\"http://test\">HELLO THERE!!!</ns1:input></ns1:echoString>";
 	private QName serviceQname = new QName("http://ws.apache.org/axis2", "EchoService");
 	private QName portQname = new QName("http://ws.apache.org/axis2", "EchoServiceSOAP11port0");
-
-  // FIXME: The server should not be restarted each time
-  protected void setUp() throws Exception {
-    super.setUp();
-    StartServer startServer = new StartServer("server1");
-    startServer.testStartServer();
-  }
-
-  // FIXME: The server should not be restarted each time
-  protected void tearDown() throws Exception {
-    super.tearDown();
-    StopServer stopServer = new StopServer("server1");
-    stopServer.testStopServer();
-  }
 
   public void testSync() {
 		try {

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DispatchTestSuite.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DispatchTestSuite.java?rev=415999&r1=415998&r2=415999&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DispatchTestSuite.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/DispatchTestSuite.java Wed Jun 21 07:44:13 2006
@@ -1,10 +1,6 @@
 package org.apache.axis2.jaxws;
 
-import org.apache.axis2.jaxws.framework.StartServer;
-import org.apache.axis2.jaxws.framework.StopServer;
-
 import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 public class DispatchTestSuite {
 
@@ -20,9 +16,9 @@
         suite.addTestSuite(DOMSourceDispatch.class);
         suite.addTestSuite(SAXSourceDispatch.class);
         // FIXME: Add this test in
-        /*
+        
         suite.addTestSuite(JAXBDispatch.class);
-        */
+        
         return suite;
     }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SAXSourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SAXSourceDispatch.java?rev=415999&r1=415998&r2=415999&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SAXSourceDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SAXSourceDispatch.java Wed Jun 21 07:44:13 2006
@@ -1,7 +1,6 @@
 package org.apache.axis2.jaxws;
 
 import java.io.ByteArrayInputStream;
-import java.net.URL;
 import java.util.Map;
 import java.util.concurrent.Future;
 
@@ -16,8 +15,6 @@
 import junit.framework.TestCase;
 
 import org.apache.axis2.jaxws.CallbackHandler;
-import org.apache.axis2.jaxws.framework.StartServer;
-import org.apache.axis2.jaxws.framework.StopServer;
 import org.xml.sax.InputSource;
 
 public class SAXSourceDispatch extends TestCase{
@@ -29,20 +26,6 @@
 	private String xmlString = "<ns1:echoString xmlns:ns1=\"http://test\"><ns1:input xmlns=\"http://test\">HELLO THERE!!!</ns1:input></ns1:echoString>";
 	private QName serviceQname = new QName("http://ws.apache.org/axis2", "EchoService");
 	private QName portQname = new QName("http://ws.apache.org/axis2", "EchoServiceSOAP11port0");
-
-  // FIXME: The server should not be restarted each time
-  protected void setUp() throws Exception {
-    super.setUp();
-    StartServer startServer = new StartServer("server1");
-    startServer.testStartServer();
-  }
-
-  // FIXME: The server should not be restarted each time
-  protected void tearDown() throws Exception {
-    super.tearDown();
-    StopServer stopServer = new StopServer("server1");
-    stopServer.testStopServer();
-  }
 
 	public void testSync() {
 		try {

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SourceDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SourceDispatch.java?rev=415999&r1=415998&r2=415999&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SourceDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/SourceDispatch.java Wed Jun 21 07:44:13 2006
@@ -2,7 +2,6 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
-import java.net.URL;
 import java.util.Map;
 import java.util.concurrent.Future;
 
@@ -15,8 +14,6 @@
 import javax.xml.ws.Service.Mode;
 
 import org.apache.axis2.jaxws.CallbackHandler;
-import org.apache.axis2.jaxws.framework.StartServer;
-import org.apache.axis2.jaxws.framework.StopServer;
 
 import junit.framework.TestCase;
 
@@ -29,20 +26,6 @@
 	private String xmlString = "<ns1:echoString xmlns:ns1=\"http://test\"><ns1:input xmlns=\"http://test\">HELLO THERE!!!</ns1:input></ns1:echoString>";
 	private QName serviceQname = new QName("http://ws.apache.org/axis2", "EchoService");
 	private QName portQname = new QName("http://ws.apache.org/axis2", "EchoServiceSOAP11port0");
-
-  // FIXME: The server should not be restarted each time
-  protected void setUp() throws Exception {
-    super.setUp();
-    StartServer startServer = new StartServer("server1");
-    startServer.testStartServer();
-  }
-
-  // FIXME: The server should not be restarted each time
-  protected void tearDown() throws Exception {
-    super.tearDown();
-    StopServer stopServer = new StopServer("server1");
-    stopServer.testStopServer();
-  }
 
   public void testSync() {
 		try {

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/StringDispatch.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/StringDispatch.java?rev=415999&r1=415998&r2=415999&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/StringDispatch.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/StringDispatch.java Wed Jun 21 07:44:13 2006
@@ -1,7 +1,5 @@
 package org.apache.axis2.jaxws;
 
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.util.Map;
 import java.util.concurrent.Future;
 
@@ -13,8 +11,6 @@
 import javax.xml.ws.Service.Mode;
 
 import org.apache.axis2.jaxws.CallbackHandler;
-import org.apache.axis2.jaxws.framework.StartServer;
-import org.apache.axis2.jaxws.framework.StopServer;
 
 import junit.framework.TestCase;
 
@@ -28,20 +24,6 @@
     private String xmlString = "<ns1:echoString xmlns:ns1=\"http://test\"><ns1:input xmlns=\"http://test\">HELLO THERE!!!</ns1:input></ns1:echoString>";
     private QName serviceQname = new QName("http://ws.apache.org/axis2", "EchoService");
     private QName portQname = new QName("http://ws.apache.org/axis2", "EchoServiceSOAP11port0");
-    
-    // FIXME: The server should not be restarted each time
-	protected void setUp() throws Exception {
-		super.setUp();
-		StartServer startServer = new StartServer("server1");
-		startServer.testStartServer();
-	}
-
-	// FIXME: The server should not be restarted each time
-	protected void tearDown() throws Exception {
-		super.tearDown();
-		StopServer stopServer = new StopServer("server1");
-		stopServer.testStopServer();
-	}
     
     /*
      * Invoke a sync Dispatch with no WSDL configuration

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java?rev=415999&r1=415998&r2=415999&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/framework/JAXWSTest.java Wed Jun 21 07:44:13 2006
@@ -1,20 +1,18 @@
 package org.apache.axis2.jaxws.framework;
 
 import org.apache.axis2.jaxws.DispatchTestSuite;
-import org.apache.axis2.jaxws.provider.SimpleProvider;
-
-
 
+import junit.extensions.TestSetup;
+import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
-import junit.textui.TestRunner;
 
 public class JAXWSTest extends TestCase {
     /**
      * suite
      * @return
      */
-    public static TestSuite suite() {
+    public static Test suite() {
         TestSuite suite = new TestSuite();
         
         // Add each of the test suites
@@ -23,21 +21,19 @@
         // Add individual test classes
         // TODO: suite.addTestSuite(SimpleProvider.class);
 
-        return suite;
+        // Start (and stop) the server only once for all the tests
+        TestSetup testSetup = new TestSetup(suite) {
+            public void setUp() {
+                System.out.println("Starting the server.");
+                StartServer startServer = new StartServer("server1");
+                startServer.testStartServer();
+            }
+            public void tearDown() {
+                System.out.println("Stopping the server");
+                StopServer stopServer = new StopServer("server1");
+                stopServer.testStopServer();
+            }
+        };
+        return testSetup;
     }
-/*
-    // TODO:
-	protected void setUp() throws Exception {
-		super.setUp();
-		StartServer startServer = new StartServer("server1");
-		startServer.testStartServer();
-	}
-
-	// TODO:
-	protected void tearDown() throws Exception {
-		super.tearDown();
-		StopServer stopServer = new StopServer("server1");
-		stopServer.testStopServer();
-	}
-*/
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org