axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: xml-axis/java/test/wsdl Wsdl2javaTestSuite.xml
Date Wed, 05 Dec 2001 23:46:34 GMT
scheu       01/12/05 15:46:34

  Modified:    java     build.xml
               java/test build_functional_tests.xml
               java/test/wsdl Wsdl2javaTestSuite.xml
  Added:       java/test/sequence/impl SequenceInfo.java
                        SequenceTestServiceTestCase.java
                        SequenceTestSoapBindingImpl.java
  Removed:     java/test/sequence SequenceInfo.java
                        SequenceTestServiceTestCase.java
  Log:
  Cleaned up sequencetest...sometimes I hate cvs and ant.
  Why doesn't the ant installation have a regexp mapper!
  
  Revision  Changes    Path
  1.91      +1 -1      xml-axis/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/build.xml,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- build.xml	2001/11/30 19:37:36	1.90
  +++ build.xml	2001/12/05 23:46:34	1.91
  @@ -268,7 +268,7 @@
         <exclude name="test/faults/wsdl/*.java" />
         <exclude name="test/multiref/*.java" />
         <exclude name="test/arrays/*.java" />
  -      <exclude name="test/sequence/*.java" />
  +      <exclude name="test/*/impl/*.java" />
         <exclude name="test/wsdl/Wsdl2javaTestSuite.java" unless="servlet.present"/>
         <exclude name="test/md5attach/*.java" unless="attachments.present"/>
       </javac>
  
  
  
  1.24      +11 -2     xml-axis/java/test/build_functional_tests.xml
  
  Index: build_functional_tests.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/build_functional_tests.xml,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- build_functional_tests.xml	2001/11/28 17:10:19	1.23
  +++ build_functional_tests.xml	2001/12/05 23:46:34	1.24
  @@ -125,17 +125,26 @@
       <copy todir="${build.dir}/work/test" overwrite="yes">
         <fileset dir="${test.dir}">
           <include name="**/*Impl.java"/>
  +        <exclude name="**/impl/*.java" />
         </fileset>
         <fileset dir="${test.dir}">
           <include name="**/*TestCase.java"/>
  +        <exclude name="**/impl/*.java" />
         </fileset>
         <fileset dir="${test.dir}">
           <include name="**/Main.java"/>
  +        <exclude name="**/impl/*.java" />
         </fileset>
  -      <fileset dir="${test.dir}">
  -        <include name="sequence/SequenceInfo.java"/>
  +    </copy>
  +    <!-- Copy everything in sequence/impl directories into the corresponding work directories
  +        (and prune off the impl directory on the copy.
  +        Wish I could do this a better way, but ant does not have a regexp mapper installed.
-->
  +    <copy todir="${build.dir}/work/test/sequence" overwrite="yes">
  +      <fileset dir="${test.dir}/sequence/impl">
  +        <include name="*.java"/>
         </fileset>
       </copy>
  +
       <copy todir="${build.dir}/work/samples" overwrite="yes">
         <fileset dir="${samples.dir}">
           <include name="**/*BindingImpl.java"/>
  
  
  
  1.1                  xml-axis/java/test/sequence/impl/SequenceInfo.java
  
  Index: SequenceInfo.java
  ===================================================================
  /**
   * SequenceInfo.java
   *
   * Hand modified to add code that checks for proper serialization order.
   * @author: Rich Scheuerle (scheu@us.ibm.com)
   */
  
  package test.sequence;
  
  import java.util.Vector;
  
  public class SequenceInfo implements java.io.Serializable {
      private int zero;
      private int one;
      private int two;
      private int three;
      private int four;
      private int five;
      private Vector v;
  
      public SequenceInfo() {
          v = new Vector();
      }
  
      public SequenceInfo(int zero, int one, int two, int three, int four, int five) {
          this.zero = zero;
          this.one = one;
          this.two = two;
          this.three = three;
          this.four = four;
          this.five = five;
      }
  
      public int getZero() {
          return zero;
      }
  
      public void setZero(int zero) {
          this.zero = zero;
          v.add("zero");
      }
  
      public int getOne() {
          return one;
      }
  
      public void setOne(int one) {
          this.one = one;
          v.add("one");
      }
  
      public int getTwo() {
          return two;
      }
  
      public void setTwo(int two) {
          this.two = two;
          v.add("two");
      }
  
      public int getThree() {
          return three;
      }
  
      public void setThree(int three) {
          this.three = three;
          v.add("three");
      }
  
      public int getFour() {
          return four;
      }
  
      public void setFour(int four) {
          this.four = four;
          v.add("four");
      }
  
      public int getFive() {
          return five;
      }
  
      public void setFive(int five) {
          this.five = five;
          v.add("five");
      }
  
      public Vector order() { 
          return v;
      }
  }
  
  
  
  1.1                  xml-axis/java/test/sequence/impl/SequenceTestServiceTestCase.java
  
  Index: SequenceTestServiceTestCase.java
  ===================================================================
  /**
   * SequenceTestServiceTestCase.java
   *
   * @author: Rich Scheuerle (scheu@us.ibm.com)
   */
  
  package test.sequence;
  
  public class SequenceTestServiceTestCase extends junit.framework.TestCase {
      public SequenceTestServiceTestCase(String name) {
          super(name);
      }
  
      public void testSequenceTest() {
          test.sequence.SequenceTestPortType binding =
              new SequenceTest().getSequenceTest();
          assertTrue("binding is null", binding != null);
          try {
              int value = -3;
              value = binding.testSequence(new test.sequence.SequenceInfo());
              assertTrue("Test Sequence Failed="+value , (value == 0));
          } catch (java.rmi.RemoteException re) {
              throw new junit.framework.AssertionFailedError("Remote Exception caught: " +
re );
          }
      }
  }
  
  
  
  
  1.1                  xml-axis/java/test/sequence/impl/SequenceTestSoapBindingImpl.java
  
  Index: SequenceTestSoapBindingImpl.java
  ===================================================================
  /**
   * SequenceTestSOAPBindingImpl.java
   *
   * @author: Rich Scheuerle (scheu@us.ibm.com)
   */
  
  package test.sequence;
  import java.util.Vector;
  
  public class SequenceTestSoapBindingImpl implements test.sequence.SequenceTestPortType {
      public int testSequence(test.sequence.SequenceInfo info) throws java.rmi.RemoteException
{
          Vector v = info.order();
          if (v == null || v.size() != 6) 
              return -100;
          if (!((String)v.elementAt(0)).equals("zero")) {
              return -1;
          }
          if (!((String)v.elementAt(1)).equals("one")) {
              return -2;
          }
          if (!((String)v.elementAt(2)).equals("two")) {
              return -3;
          }
          if (!((String)v.elementAt(3)).equals("three")) {
              return -4;
          }
          if (!((String)v.elementAt(4)).equals("four")) {
              return -5;
          }
          if (!((String)v.elementAt(5)).equals("five")) {
              return -6;
          }
          return 0; // Success
      }
  }
  
  
  
  1.32      +3 -4      xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
  
  Index: Wsdl2javaTestSuite.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- Wsdl2javaTestSuite.xml	2001/12/05 23:04:39	1.31
  +++ Wsdl2javaTestSuite.xml	2001/12/05 23:46:34	1.32
  @@ -65,13 +65,12 @@
           <mapping namespace="urn:SequenceTest2" package="test.sequence"/>
       </wsdl2java>
       <!-- Copy modified files to work directory -->
  -    <copy todir="${build.dir}/work/test" overwrite="yes">
  -      <fileset dir="${test.dir}">
  -        <include name="sequence/SequenceInfo.java"/>
  +    <copy todir="${build.dir}/work/test/sequence" overwrite="yes">
  +      <fileset dir="${test.dir}/sequence/impl">
  +        <include name="SequenceInfo.java"/>
         </fileset>
       </copy>
       <!-- Compile Java -->
  -    <echo message="${build.dir} ${build.dest}"/>
       <javac srcdir="${build.dir}/work" destdir="${build.dest}"
              debug="${debug}">
         <classpath refid="test-classpath" />
  
  
  

Mime
View raw message