axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r154239 - in webservices/axis/trunk/java: modules/deployment/src/test/org/apache/axis/deployment/ modules/om/src/test/org/apache/axis/om/ modules/om/src/test/org/apache/axis/om/builder/ modules/om/src/test/org/apache/axis/om/builder/dummy/ modules/om/src/test/org/apache/axis/om/factory/ modules/om/src/test/org/apache/axis/om/impl/builder/ modules/om/src/test/org/apache/axis/om/impl/seriliazer/ modules/om/src/test/org/apache/axis/om/impl/streamwrapper/ modules/om/src/test/org/apache/axis/om/impl/traverse/ modules/wsdl/src/test/org/apache/wsdl/ samples/
Date Fri, 18 Feb 2005 05:34:58 GMT
Author: hemapani
Date: Thu Feb 17 21:34:50 2005
New Revision: 154239

URL: http://svn.apache.org/viewcvs?view=rev&rev=154239
Log:
fixing the test cases

Added:
    webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/AbstractTestCase.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/AbstractTestCase.java
    webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/AbstractTestCase.java
Removed:
    webservices/axis/trunk/java/samples/
Modified:
    webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadModuleTest.java
    webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServerXMLTest.java
    webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
    webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
    webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/DeploymentotalTest.java
    webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/TransportDeploymentTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/BadInputTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/CompareOMWithDOMTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/IteratorTester.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMChildrenQNameIteratorTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMHeaderTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMNavigatorTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestCase.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestUtils.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/SOAPFaultTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java
    webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java
    webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/InterfaceTest.java
    webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/WOMBuilderTest.java

Added: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/AbstractTestCase.java?view=auto&rev=154239
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/AbstractTestCase.java
(added)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/AbstractTestCase.java
Thu Feb 17 21:34:50 2005
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.deployment;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+/**
+ * Abstract base class for test cases.
+ */
+public abstract class AbstractTestCase
+        extends TestCase {
+    protected String testDir = "src" + File.separator + "test" + File.separator;
+    protected String sampleDir = "src" + File.separator + "samples" + File.separator;
+    protected String outDir = "target" + File.separator + "generated" + File.separator +
"samples" + File.separator;
+    protected String tempDir = "target" + File.separator + "generated" + File.separator +
"temp";
+    protected String testResourceDir = "src" + File.separator + "test-resources";
+
+
+    /**
+     * Basedir for all file I/O. Important when running tests from
+     * the reactor.
+     */
+    public String basedir = System.getProperty("basedir");
+
+    /**
+     * @param testName
+     */
+    public AbstractTestCase(String testName) {
+        super(testName);
+        if (basedir == null) {
+            basedir = new File(".").getAbsolutePath();
+        }
+        testDir = new File(basedir, testDir).getAbsolutePath();
+        sampleDir = new File(basedir, sampleDir).getAbsolutePath();
+        outDir = new File(basedir, outDir).getAbsolutePath();
+        tempDir = new File(basedir, tempDir).getAbsolutePath();
+    }
+
+
+    public File getTestResourceFile(String relativePath) {
+        return new File(testResourceDir, relativePath);
+    }
+}
+

Modified: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadModuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadModuleTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadModuleTest.java
(original)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadModuleTest.java
Thu Feb 17 21:34:50 2005
@@ -1,11 +1,10 @@
 package org.apache.axis.deployment;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.description.AxisGlobal;
-
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
+
+import org.apache.axis.description.AxisGlobal;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServerXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServerXMLTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServerXMLTest.java
(original)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServerXMLTest.java
Thu Feb 17 21:34:50 2005
@@ -1,11 +1,10 @@
 package org.apache.axis.deployment;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.description.AxisGlobal;
-
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
+
+import org.apache.axis.description.AxisGlobal;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServiceXMLTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
(original)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BadServiceXMLTest.java
Thu Feb 17 21:34:50 2005
@@ -1,11 +1,10 @@
 package org.apache.axis.deployment;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.description.AxisService;
-
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.InputStream;
+
+import org.apache.axis.description.AxisService;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
(original)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/BuildERWithDeploymentTest.java
Thu Feb 17 21:34:50 2005
@@ -15,15 +15,14 @@
 */
 package org.apache.axis.deployment;
 
-import org.apache.axis.AbstractTestCase;
+import javax.xml.namespace.QName;
+
 import org.apache.axis.description.AxisOperation;
 import org.apache.axis.description.AxisService;
 import org.apache.axis.description.Flow;
 import org.apache.axis.engine.EngineRegistry;
 import org.apache.axis.engine.Provider;
 import org.apache.axis.providers.RawXMLProvider;
-
-import javax.xml.namespace.QName;
 
 public class BuildERWithDeploymentTest extends AbstractTestCase {
     /**

Modified: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/DeploymentotalTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/DeploymentotalTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/DeploymentotalTest.java
(original)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/DeploymentotalTest.java
Thu Feb 17 21:34:50 2005
@@ -1,11 +1,12 @@
 package org.apache.axis.deployment;
 
+import javax.xml.stream.XMLStreamException;
+
 import junit.framework.TestCase;
+
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineRegistry;
 import org.apache.axis.phaseresolver.PhaseException;
-
-import javax.xml.stream.XMLStreamException;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/TransportDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/TransportDeploymentTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/TransportDeploymentTest.java
(original)
+++ webservices/axis/trunk/java/modules/deployment/src/test/org/apache/axis/deployment/TransportDeploymentTest.java
Thu Feb 17 21:34:50 2005
@@ -1,13 +1,12 @@
 package org.apache.axis.deployment;
 
-import org.apache.axis.AbstractTestCase;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
 import org.apache.axis.description.AxisTransport;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineRegistry;
 import org.apache.axis.phaseresolver.PhaseException;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Added: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/AbstractTestCase.java?view=auto&rev=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/AbstractTestCase.java
(added)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/AbstractTestCase.java
Thu Feb 17 21:34:50 2005
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis.om;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+/**
+ * Abstract base class for test cases.
+ */
+public abstract class AbstractTestCase
+        extends TestCase {
+    protected String testDir = "src" + File.separator + "test" + File.separator;
+    protected String sampleDir = "src" + File.separator + "samples" + File.separator;
+    protected String outDir = "target" + File.separator + "generated" + File.separator +
"samples" + File.separator;
+    protected String tempDir = "target" + File.separator + "generated" + File.separator +
"temp";
+    protected String testResourceDir = "src" + File.separator + "test-resources";
+
+
+    /**
+     * Basedir for all file I/O. Important when running tests from
+     * the reactor.
+     */
+    public String basedir = System.getProperty("basedir");
+
+    /**
+     * @param testName
+     */
+    public AbstractTestCase(String testName) {
+        super(testName);
+        if (basedir == null) {
+            basedir = new File(".").getAbsolutePath();
+        }
+        testDir = new File(basedir, testDir).getAbsolutePath();
+        sampleDir = new File(basedir, sampleDir).getAbsolutePath();
+        outDir = new File(basedir, outDir).getAbsolutePath();
+        tempDir = new File(basedir, tempDir).getAbsolutePath();
+    }
+
+
+    public File getTestResourceFile(String relativePath) {
+        return new File(testResourceDir, relativePath);
+    }
+}
+

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/BadInputTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/BadInputTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/BadInputTest.java (original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/BadInputTest.java Thu
Feb 17 21:34:50 2005
@@ -19,9 +19,9 @@
  */
 package org.apache.axis.om;
 
-import org.apache.axis.engine.AxisFault;
-
 import java.io.File;
+
+import org.apache.axis.engine.AxisFault;
 
 
 public class BadInputTest extends OMTestCase {

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/CompareOMWithDOMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/CompareOMWithDOMTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/CompareOMWithDOMTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/CompareOMWithDOMTest.java
Thu Feb 17 21:34:50 2005
@@ -15,12 +15,12 @@
  */
 package org.apache.axis.om;
 
-import org.apache.axis.AbstractTestCase;
-import org.w3c.dom.Document;
+import java.io.File;
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
-import java.io.File;
+
+import org.w3c.dom.Document;
 
 /**
  * @version $Rev: $ $Date: $

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/IteratorTester.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/IteratorTester.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/IteratorTester.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/IteratorTester.java
Thu Feb 17 21:34:50 2005
@@ -1,11 +1,11 @@
 package org.apache.axis.om;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
-
-import javax.xml.stream.XMLInputFactory;
 import java.io.FileReader;
 import java.util.Iterator;
+
+import javax.xml.stream.XMLInputFactory;
+
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMChildrenQNameIteratorTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMChildrenQNameIteratorTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMChildrenQNameIteratorTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMChildrenQNameIteratorTest.java
Thu Feb 17 21:34:50 2005
@@ -16,14 +16,14 @@
  * limitations under the License.
  */
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
-import org.apache.axis.om.impl.llom.traverse.OMChildrenQNameIterator;
+import java.io.FileReader;
+import java.util.Iterator;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLInputFactory;
-import java.io.FileReader;
-import java.util.Iterator;
+
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
+import org.apache.axis.om.impl.llom.traverse.OMChildrenQNameIterator;
 
 public class OMChildrenQNameIteratorTest extends AbstractTestCase {
 

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMHeaderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMHeaderTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMHeaderTest.java (original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMHeaderTest.java Thu
Feb 17 21:34:50 2005
@@ -19,9 +19,9 @@
  */
 package org.apache.axis.om;
 
-import org.apache.axis.om.impl.llom.OMNamespaceImpl;
-
 import java.util.Iterator;
+
+import org.apache.axis.om.impl.llom.OMNamespaceImpl;
 
 
 public class OMHeaderTest extends OMTestCase {

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMNavigatorTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMNavigatorTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMNavigatorTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMNavigatorTest.java
Thu Feb 17 21:34:50 2005
@@ -1,16 +1,16 @@
 package org.apache.axis.om;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.impl.llom.OMNavigator;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
 
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
+
+import org.apache.axis.om.impl.llom.OMNavigator;
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTest.java (original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTest.java Thu Feb
17 21:34:50 2005
@@ -15,14 +15,14 @@
  */
 package org.apache.axis.om;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
 import java.io.File;
 import java.io.FileReader;
 import java.util.Iterator;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
 
 /**
  * This test case tests the basic expectations of the engine from the OM.

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestCase.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestCase.java (original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestCase.java Thu
Feb 17 21:34:50 2005
@@ -1,12 +1,16 @@
 package org.apache.axis.om;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
-
-import javax.xml.stream.*;
 import java.io.FileReader;
 import java.io.InputStream;
 import java.io.OutputStream;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis.om.impl.llom.builder.StAXSOAPModelBuilder;
 
 
 /**

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestUtils.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestUtils.java (original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/OMTestUtils.java Thu
Feb 17 21:34:50 2005
@@ -16,16 +16,22 @@
 
 package org.apache.axis.om;
 
-import junit.framework.TestCase;
-import org.apache.axis.engine.AxisFault;
-import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
-import org.w3c.dom.*;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
 import java.io.File;
 import java.io.FileReader;
 import java.util.Iterator;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+
+import junit.framework.TestCase;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 
 public class OMTestUtils {
 

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/SOAPFaultTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/SOAPFaultTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/SOAPFaultTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/SOAPFaultTest.java
Thu Feb 17 21:34:50 2005
@@ -1,7 +1,5 @@
 package org.apache.axis.om;
 
-import org.apache.axis.AbstractTestCase;
-
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java
Thu Feb 17 21:34:50 2005
@@ -1,16 +1,22 @@
 package org.apache.axis.om.builder;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Iterator;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamWriter;
+
 import junit.framework.TestCase;
-import org.apache.axis.om.*;
+
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
 import org.apache.axis.om.builder.dummy.DummyOutObject;
 import org.apache.axis.testUtils.Encoder;
 import org.apache.axis.testUtils.ObjectToOMBuilder;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.util.Iterator;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
Thu Feb 17 21:34:50 2005
@@ -1,5 +1,11 @@
 package org.apache.axis.om.builder.dummy;
 
+import java.io.FileReader;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.stream.XMLStreamReader;
+
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.om.OMException;
 import org.apache.axis.testUtils.Encoder;
@@ -7,11 +13,6 @@
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
 import org.xml.sax.XMLReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLStreamReader;
-import java.io.FileReader;
 
 /**
  * Copyright 2001-2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/factory/OMLinkedListImplFactoryTest.java
Thu Feb 17 21:34:50 2005
@@ -17,8 +17,19 @@
  * <p/>
  */
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.*;
+import org.apache.axis.om.AbstractTestCase;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMTestUtils;
+import org.apache.axis.om.OMText;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPBody;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.SOAPFault;
+import org.apache.axis.om.SOAPHeader;
+import org.apache.axis.om.SOAPHeaderBlock;
 
 /**
  * User: Eran Chinthaka (eran.chinthaka@gmail.com)

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/builder/StAXOMBuilderTest.java
Thu Feb 17 21:34:50 2005
@@ -20,7 +20,7 @@
  * Time: 2:29:07 PM
  */
 
-import org.apache.axis.AbstractTestCase;
+import org.apache.axis.om.AbstractTestCase;
 import org.apache.axis.om.OMElement;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMNode;

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/ElementSerializerTest.java
Thu Feb 17 21:34:50 2005
@@ -1,16 +1,24 @@
 package org.apache.axis.om.impl.seriliazer;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.om.*;
-import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
 
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
+
+import org.apache.axis.om.AbstractTestCase;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMText;
+import org.apache.axis.om.OMXMLParserWrapper;
+import org.apache.axis.om.SOAPBody;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.om.impl.llom.factory.OMXMLBuilderFactory;
 
 
 /**

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/seriliazer/OMSerailizerTest.java
Thu Feb 17 21:34:50 2005
@@ -1,6 +1,6 @@
 package org.apache.axis.om.impl.seriliazer;
 
-import org.apache.axis.AbstractTestCase;
+import org.apache.axis.om.AbstractTestCase;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMXMLParserWrapper;
 import org.apache.axis.om.SOAPBody;

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OMStaxStreamingWrapperTest.java
Thu Feb 17 21:34:50 2005
@@ -1,6 +1,6 @@
 package org.apache.axis.om.impl.streamwrapper;
 
-import org.apache.axis.AbstractTestCase;
+import org.apache.axis.om.AbstractTestCase;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMXMLParserWrapper;
 import org.apache.axis.om.SOAPEnvelope;

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/streamwrapper/OmStAXBuilderTest.java
Thu Feb 17 21:34:50 2005
@@ -1,6 +1,6 @@
 package org.apache.axis.om.impl.streamwrapper;
 
-import org.apache.axis.AbstractTestCase;
+import org.apache.axis.om.AbstractTestCase;
 import org.apache.axis.om.OMFactory;
 import org.apache.axis.om.OMXMLParserWrapper;
 import org.apache.axis.om.SOAPEnvelope;

Modified: webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java
(original)
+++ webservices/axis/trunk/java/modules/om/src/test/org/apache/axis/om/impl/traverse/OMChildrenWithSpecificAttributeIteratorTest.java
Thu Feb 17 21:34:50 2005
@@ -19,16 +19,17 @@
  */
 package org.apache.axis.om.impl.traverse;
 
+import java.io.ByteArrayInputStream;
+import java.util.Iterator;
+
+import javax.xml.namespace.QName;
+
 import org.apache.axis.addressing.AddressingConstants;
 import org.apache.axis.om.OMConstants;
 import org.apache.axis.om.OMTestCase;
 import org.apache.axis.om.SOAPHeader;
 import org.apache.axis.om.SOAPHeaderBlock;
 import org.apache.axis.om.impl.llom.traverse.OMChildrenWithSpecificAttributeIterator;
-
-import javax.xml.namespace.QName;
-import java.io.ByteArrayInputStream;
-import java.util.Iterator;
 
 
 public class OMChildrenWithSpecificAttributeIteratorTest extends OMTestCase implements OMConstants
{

Added: webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/AbstractTestCase.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/AbstractTestCase.java?view=auto&rev=154239
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/AbstractTestCase.java
(added)
+++ webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/AbstractTestCase.java
Thu Feb 17 21:34:50 2005
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.wsdl;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+/**
+ * Abstract base class for test cases.
+ */
+public abstract class AbstractTestCase
+        extends TestCase {
+    protected String testDir = "src" + File.separator + "test" + File.separator;
+    protected String sampleDir = "src" + File.separator + "samples" + File.separator;
+    protected String outDir = "target" + File.separator + "generated" + File.separator +
"samples" + File.separator;
+    protected String tempDir = "target" + File.separator + "generated" + File.separator +
"temp";
+    protected String testResourceDir = "src" + File.separator + "test-resources";
+
+
+    /**
+     * Basedir for all file I/O. Important when running tests from
+     * the reactor.
+     */
+    public String basedir = System.getProperty("basedir");
+
+    /**
+     * @param testName
+     */
+    public AbstractTestCase(String testName) {
+        super(testName);
+        if (basedir == null) {
+            basedir = new File(".").getAbsolutePath();
+        }
+        testDir = new File(basedir, testDir).getAbsolutePath();
+        sampleDir = new File(basedir, sampleDir).getAbsolutePath();
+        outDir = new File(basedir, outDir).getAbsolutePath();
+        tempDir = new File(basedir, tempDir).getAbsolutePath();
+    }
+
+
+    public File getTestResourceFile(String relativePath) {
+        return new File(testResourceDir, relativePath);
+    }
+}
+

Modified: webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/InterfaceTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/InterfaceTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/InterfaceTest.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/InterfaceTest.java Thu
Feb 17 21:34:50 2005
@@ -15,12 +15,12 @@
  */
 package org.apache.wsdl;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.wsdl.impl.WSDLInterfaceImpl;
-import org.apache.wsdl.impl.WSDLOperationImpl;
+import java.util.Iterator;
 
 import javax.xml.namespace.QName;
-import java.util.Iterator;
+
+import org.apache.wsdl.impl.WSDLInterfaceImpl;
+import org.apache.wsdl.impl.WSDLOperationImpl;
 
 public class InterfaceTest extends AbstractTestCase {
     public InterfaceTest(String testName) {

Modified: webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/WOMBuilderTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/WOMBuilderTest.java?view=diff&r1=154238&r2=154239
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/WOMBuilderTest.java
(original)
+++ webservices/axis/trunk/java/modules/wsdl/src/test/org/apache/wsdl/WOMBuilderTest.java
Thu Feb 17 21:34:50 2005
@@ -15,10 +15,9 @@
  */
 package org.apache.wsdl;
 
-import org.apache.axis.AbstractTestCase;
-import org.apache.axis.wsdl.wsdltowom.WOMBuilderFactory;
-import org.apache.wsdl.util.Utils;
-import org.w3c.dom.Document;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.Iterator;
 
 import javax.wsdl.Definition;
 import javax.wsdl.Operation;
@@ -26,9 +25,10 @@
 import javax.wsdl.Service;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.Iterator;
+
+import org.apache.axis.wsdl.wsdltowom.WOMBuilderFactory;
+import org.apache.wsdl.util.Utils;
+import org.w3c.dom.Document;
 
 /**
  * @author chathura@opensource.lk



Mime
View raw message