Author: alessio.soldano(a)jboss.com
Date: 2012-08-06 08:35:40 -0400 (Mon, 06 Aug 2012)
New Revision: 16569
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java
Log:
[JBPAPP-9648] svn merge -r 16530:16531
https://svn.jboss.org/repos/jbossws/shared-testsuite/trunk .
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java
===================================================================
---
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java 2012-08-06
11:30:08 UTC (rev 16568)
+++
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java 2012-08-06
12:35:40 UTC (rev 16569)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2012, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -26,7 +26,6 @@
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.net.URLClassLoader;
-import java.util.Arrays;
import java.util.List;
import java.util.LinkedList;
import java.util.StringTokenizer;
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
===================================================================
---
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2012-08-06
11:30:08 UTC (rev 16568)
+++
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2012-08-06
12:35:40 UTC (rev 16569)
@@ -155,31 +155,76 @@
assertTrue("Source directory switch ignored", sei.exists());
}
- public void testNocompileNoKeep() throws Exception
+ public void testNoCompile() throws Exception
{
- File sourceDir = new File(workDirectory,
"wsconsumeNoCPNOKeepsource/java/");
- File outputDir = new File(workDirectory,
"wsconsumeNoCPNOKeepOutput/java/");
+ File sourceDir = new File(workDirectory, "wsconsumeNoCPSources/java/");
+ File outputDir = new File(workDirectory, "wsconsumeNoCPOutput/java/");
consumer.setTargetPackage("org.jboss.test.ws.tools.testSourceDirectory");
consumer.setSourceDirectory(sourceDir);
consumer.setOutputDirectory(outputDir);
+ consumer.setGenerateSource(true);
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestService.wsdl").getCanonicalPath());
- File sei = new File(workDirectory,
"wsconsumeNoCPNOKeepOutput/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ File sei = new File(workDirectory,
"wsconsumeNoCPSources/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
assertTrue("Expected sei not generated in the expected directory " +
outputDir.getPath() , sei.exists());
- File notExistSei = new File(workDirectory,
"wsconsumeNoCPNOKeepsource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ File notExistSei = new File(workDirectory,
"wsconsumeNoCPOutput/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
assertFalse("Directory " + sourceDir.getPath() + " is expected to
empty", notExistSei.exists());
}
+ public void testNoCompileNoKeep() throws Exception
+ {
+ File sourceDir = new File(workDirectory,
"wsconsumeNoCPNoKeepsource/java/");
+ File outputDir = new File(workDirectory,
"wsconsumeNoCPNoKeepOutput/java/");
+
consumer.setTargetPackage("org.jboss.test.ws.tools.testSourceDirectory");
+ consumer.setSourceDirectory(sourceDir);
+ consumer.setOutputDirectory(outputDir);
+ consumer.setGenerateSource(false);
+
+
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestService.wsdl").getCanonicalPath());
+
+ File sourceSei = new File(workDirectory,
"wsconsumeNoCPNoKeepsource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ assertFalse("Directory " + sourceDir.getPath() + " is expected to
be empty", sourceSei.exists());
+
+ File outputSei = new File(workDirectory,
"wsconsumeNoCPNoKeepOutput/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ assertFalse("Directory " + sourceDir.getPath() + " is expected to
be empty", outputSei.exists());
+ }
+
/**
* Enables/Disables Java source generation.
*
*/
public void testGenerateSource() throws Exception
{
- testTargetPackage();
+ File sourceDir = new File(workDirectory,
"wsconsumeGenerateSource/java/");
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testGenerateSource");
+ consumer.setSourceDirectory(sourceDir);
+ consumer.setGenerateSource(true);
+ consumer.setNoCompile(true);
+
+ consumeWSDL();
+
+ File packageDir = new File(sourceDir,
"org/jboss/test/ws/tools/testGenerateSource");
+ assertTrue("Package not created", packageDir.exists());
+
+ File seiSource = new File(sourceDir,
"org/jboss/test/ws/tools/testGenerateSource/EndpointInterface.java");
+ assertTrue("SEI not generated", seiSource.exists());
+
+ sourceDir = new File(workDirectory, "wsconsumeGenerateSource2/java/");
+
consumer.setTargetPackage("org.jboss.test.ws.tools.testGenerateSource2");
+ consumer.setSourceDirectory(sourceDir);
+ consumer.setGenerateSource(false);
+ consumer.setNoCompile(false);
+
+ consumeWSDL();
+
+ packageDir = new File(sourceDir,
"org/jboss/test/ws/tools/testGenerateSource2");
+ assertFalse("Package should not have been created!",
packageDir.exists());
+
+ File interfaceClass = new File(outputDirectory,
"org/jboss/test/ws/tools/testGenerateSource2/EndpointInterface.class");
+ assertTrue("SEI not generated", interfaceClass.exists());
}
/**
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java
===================================================================
---
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java 2012-08-06
11:30:08 UTC (rev 16568)
+++
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCaseForked.java 2012-08-06
12:35:40 UTC (rev 16569)
@@ -92,22 +92,29 @@
/**
- *JBWS-3193
- * If there are "-n" and "-s" flag, without "-k", the
generated
- * artifacts should be placed in output directory
+ * If there are "-n" and "-s" flag, with "-k", the
generated
+ * artifacts should be placed in source directory
*/
- public void testNocompileNoKeep() throws Exception
+ public void testNoCompile() throws Exception
{
- dispatch("testNocompileNoKeep");
+ dispatch("testNoCompile");
}
/**
+ * If there are "-n" and "-s" flag, without "-k",
nothing should be generated
+ */
+ public void testNoCompileNoKeep() throws Exception
+ {
+ dispatch("testNoCompileNoKeep");
+ }
+
+ /**
* Enables/Disables Java source generation.
*
*/
public void testGenerateSource() throws Exception
{
- testTargetPackage();
+ dispatch("testGenerateSource");
}
/**