Author: heiko.braun(a)jboss.com
Date: 2008-05-07 15:47:09 -0400 (Wed, 07 May 2008)
New Revision: 6948
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1881/JBWS1881TestCase.java
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbws1881/doclit/wstools-config.xml
Log:
Fix resource loading
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1881/JBWS1881TestCase.java
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1881/JBWS1881TestCase.java 2008-05-07
19:46:48 UTC (rev 6947)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/tools/jbws1881/JBWS1881TestCase.java 2008-05-07
19:47:09 UTC (rev 6948)
@@ -47,12 +47,13 @@
protected void generateScenario(final String scenario) throws Exception
{
- String resourceDir = getResourceFile("tools/jbws1881/" +
scenario).getPath();
- String toolsDir = "tools/jbws1881/" + scenario;
+ File resourceDir = createResourceFile("tools/jbws1881/" + scenario);
+ resourceDir.mkdirs();
+ String toolsDir = resourceDir.getAbsolutePath();
String[] args = new String[] { "-dest", toolsDir, "-config",
resourceDir + "/wstools-config.xml" };
new WSTools().generate(args);
- File resourceDirFile = createResourceFile(resourceDir);
- String[] expectedFiles = resourceDirFile.list(new FilenameFilter() {
+
+ String[] expectedFiles = resourceDir.list(new FilenameFilter() {
public boolean accept(File dir, String name)
{
return name.endsWith(".java");
@@ -73,7 +74,7 @@
}
}
- File packageDir = createResourceFile(toolsDir +
"/org/jboss/test/ws/jbws1881");
+ File packageDir = new File(toolsDir + "/org/jboss/test/ws/jbws1881");
String[] generatedFiles = packageDir.list();
for (int i = 0; i < generatedFiles.length; i++)
{
@@ -93,8 +94,8 @@
private static void compareSource(final String expectedName, final String
generatedName) throws Exception
{
- File expected = createResourceFile(expectedName);
- File generated = createResourceFile(generatedName);
+ File expected = new File(expectedName);
+ File generated = new File(generatedName);
JBossSourceComparator sc = new JBossSourceComparator(expected, generated);
sc.validate();
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbws1881/doclit/wstools-config.xml
===================================================================
---
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbws1881/doclit/wstools-config.xml 2008-05-07
19:46:48 UTC (rev 6947)
+++
stack/native/trunk/modules/testsuite/native-tests/src/test/resources/tools/jbws1881/doclit/wstools-config.xml 2008-05-07
19:47:09 UTC (rev 6948)
@@ -1,4 +1,4 @@
-<configuration>
+<configuration>
<wsdl-java
location="${test.resources.directory}/tools/jbws1881/doclit/PhoneBook.wsdl"
parameter-style="bare">
<mapping file="jaxrpc-mapping.xml"/>
Show replies by date