Author: thomas.diesler(a)jboss.com
Date: 2008-05-08 06:32:38 -0400 (Thu, 08 May 2008)
New Revision: 6962
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
Restore getArchiveURL
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2008-05-08 09:59:23 UTC
(rev 6961)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2008-05-08 10:32:38 UTC
(rev 6962)
@@ -128,7 +128,7 @@
public URL getArchiveURL(String archive) throws MalformedURLException
{
- return delegate.getArchiveFile(archive).toURL();
+ return delegate.getArchiveURL(archive);
}
public File getResourceFile(String resource)
@@ -136,22 +136,22 @@
return delegate.getResourceFile(resource);
}
- public static File createResourceFile(String filename)
+ public URL getResourceURL(String resource) throws MalformedURLException
{
- File resDir = new File(JBossWSTestHelper.getTestResourcesDir());
- File file = new File( resDir.getAbsolutePath() + File.separator + filename);
- return file;
+ return delegate.getResourceURL(resource);
}
- public static File createResourceFile(File parent, String filename)
+ public File createResourceFile(String filename)
{
- File file = new File( parent, filename);
+ File resDir = new File(JBossWSTestHelper.getTestResourcesDir());
+ File file = new File(resDir.getAbsolutePath() + File.separator + filename);
return file;
}
- public URL getResourceURL(String resource) throws MalformedURLException
+ public File createResourceFile(File parent, String filename)
{
- return delegate.getResourceFile(resource).toURL();
+ File file = new File(parent, filename);
+ return file;
}
/** Get the client's env context for a given name.
@@ -210,7 +210,8 @@
assertEqualsArray((float[])exp, (float[])was);
else if (exp instanceof double[] && was instanceof double[])
assertEqualsArray((double[])exp, (double[])was);
- else TestCase.assertEquals(exp, was);
+ else
+ TestCase.assertEquals(exp, was);
}
private static void assertEqualsArray(Object[] exp, Object[] was)
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-05-08
09:59:23 UTC (rev 6961)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2008-05-08
10:32:38 UTC (rev 6962)
@@ -24,6 +24,7 @@
// $Id$
import java.io.File;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.Hashtable;
@@ -218,6 +219,12 @@
}
/** Try to discover the URL for the deployment archive */
+ public URL getArchiveURL(String archive) throws MalformedURLException
+ {
+ return getArchiveFile(archive).toURL();
+ }
+
+ /** Try to discover the File for the deployment archive */
public File getArchiveFile(String archive)
{
File file = new File(archive);
@@ -233,6 +240,12 @@
}
/** Try to discover the URL for the test resource */
+ public URL getResourceURL(String resource) throws MalformedURLException
+ {
+ return getResourceFile(resource).toURL();
+ }
+
+ /** Try to discover the File for the test resource */
public File getResourceFile(String resource)
{
File file = new File(resource);
Show replies by date