axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/test Wsdl2javaTestSuite.java
Date Tue, 09 Oct 2001 14:54:06 GMT
bloritsch    01/10/09 07:54:06

  Modified:    java/src/org/apache/axis/wsdl/test Wsdl2javaTestSuite.java
  Log:
  The test framework should be just about ready....
  
  Revision  Changes    Path
  1.3       +21 -0     xml-axis/java/src/org/apache/axis/wsdl/test/Wsdl2javaTestSuite.java
  
  Index: Wsdl2javaTestSuite.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/test/Wsdl2javaTestSuite.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Wsdl2javaTestSuite.java	2001/10/09 14:38:31	1.2
  +++ Wsdl2javaTestSuite.java	2001/10/09 14:54:06	1.3
  @@ -61,6 +61,7 @@
   import org.apache.axis.wsdl.Emitter;
   import org.apache.axis.transport.http.SimpleAxisServer;
   import org.apache.axis.utils.Options;
  +import org.apache.axis.client.AdminClient;
   import org.apache.tools.ant.Location;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Target;
  @@ -87,6 +88,7 @@
       private static final String CLEAN_TASK="clean";
       private Project testSuiteProject;
       private List classNames = null;
  +    private List fileNames = null;
   
       public Wsdl2javaTestSuite(String Name) {
           super(Name);
  @@ -140,12 +142,14 @@
           wsdl2java.emit(fileName);
   
           this.classNames = wsdl2java.getGeneratedClassNames();
  +        this.fileNames = wsdl2java.getGeneratedFileNames();
   
           this.testSuiteProject.executeTarget(Wsdl2javaTestSuite.COMPILE_TASK);
       } //protected void prepareTest()
   
       private void cleanTest() {
           this.classNames = null;
  +        this.fileNames = null;
           testSuiteProject.executeTarget(Wsdl2javaTestSuite.CLEAN_TASK);
       }
   
  @@ -171,8 +175,23 @@
               String curLine = reader.readLine();
               while (curLine != null) {
                   this.prepareTest(curLine);
  +                String deploy = null;
  +                String undeploy = null;
  +
  +                Iterator files = this.fileNames.iterator();
  +                while (files.hasNext()) {
  +                    String fileName = (String) files.next();
  +                    if (fileName.endsWith("deploy.xml")) {
  +                        deploy = fileName;
  +                    } else if (fileName.endsWith("undeploy.xml")) {
  +                        undeploy = fileName;
  +                    }
  +                }
                   //deploy
  +                String[] args = new String[] { deploy };
  +                AdminClient.main(args);
   
  +                //run tests
                   Iterator names = this.classNames.iterator();
                   while (names.hasNext()) {
                       String className = (String) names.next();
  @@ -200,6 +219,8 @@
                       }
                   }
                   //undeploy
  +                args = new String[] {undeploy};
  +                AdminClient.main(args);
                   this.cleanTest();
               }
   
  
  
  

Mime
View raw message