cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r521105 - in /incubator/cxf/trunk/tools/javato: Hello.wsdl src/test/java/org/apache/cxf/tools/common/ToolTestBase.java src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java
Date Thu, 22 Mar 2007 03:15:57 GMT
Author: mmao
Date: Wed Mar 21 20:15:57 2007
New Revision: 521105

URL: http://svn.apache.org/viewvc?view=rev&rev=521105
Log:
* Remove the wsdl checked in by accident
* Move the generated wsdl/schemas into target dir

Removed:
    incubator/cxf/trunk/tools/javato/Hello.wsdl
Modified:
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/common/ToolTestBase.java
    incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/common/ToolTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/common/ToolTestBase.java?view=diff&rev=521105&r1=521104&r2=521105
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/common/ToolTestBase.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/common/ToolTestBase.java
Wed Mar 21 20:15:57 2007
@@ -20,11 +20,16 @@
 package org.apache.cxf.tools.common;
 
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.PrintStream;
+import java.net.URISyntaxException;
+import java.net.URISyntaxException;
 import java.net.URL;
 
 import junit.framework.TestCase;
 
+import org.apache.cxf.helpers.FileUtils;
+
 public abstract class ToolTestBase extends TestCase {
 
     protected PrintStream oldStdErr; 
@@ -58,5 +63,15 @@
         return new String(errOut.toByteArray());
     }
 
+    protected String getLocation(String wsdlFile) throws URISyntaxException {
+        File output = new File(getClass().getResource(".").toURI());
+        output = new File(output, "resources");
+        
+        if (!output.exists()) {
+            FileUtils.mkDir(output);            
+        }
+        
+        return new File(output, wsdlFile).toString();
+    }    
 }
 

Modified: incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java?view=diff&rev=521105&r1=521104&r2=521105
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/test/java/org/apache/cxf/tools/java2wsdl/JavaToWSDLTest.java
Wed Mar 21 20:15:57 2007
@@ -23,6 +23,10 @@
 
 public class JavaToWSDLTest extends ToolTestBase {
 
+    public void tearDown() {
+        super.tearDown();
+    }
+
     public void testVersionOutput() throws Exception {
         String[] args = new String[] {"-v"};
         JavaToWSDL.main(args);
@@ -35,8 +39,9 @@
         assertNotNull(getStdOut());
     }
 
-    public void testNormalArgs() {
-        String[] args = new String[] {"-o", "./test.wsdl", "org.apache.hello_world_soap_http.Greeter"};
+    public void testNormalArgs() throws Exception {
+        System.err.println(getLocation("test.wsdl"));
+        String[] args = new String[] {"-o", getLocation("normal.wsdl"), "org.apache.hello_world_soap_http.Greeter"};
         JavaToWSDL.main(args);
         assertNotNull(getStdOut());
     }
@@ -55,8 +60,8 @@
 
     }
 
-    public void testNoOutPutFile() {
-        String[] args = new String[] {"org.apache.hello_world_soap_http.Greeter"};
+    public void testNoOutPutFile() throws Exception {
+        String[] args = new String[] {"-o", getLocation("nooutput.wsdl"), "org.apache.hello_world_soap_http.Greeter"};
         JavaToWSDL.main(args);
         assertNotNull(getStdOut());
     }



Mime
View raw message