Author: julien(a)jboss.com
Date: 2007-08-22 11:48:40 -0400 (Wed, 22 Aug 2007)
New Revision: 8030
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/HTTPTestRunner.java
Log:
better handling of archive name in http test runner
Modified:
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/HTTPTestRunner.java
===================================================================
---
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/HTTPTestRunner.java 2007-08-22
15:35:38 UTC (rev 8029)
+++
modules/test/trunk/test/src/main/org/jboss/portal/test/framework/runner/HTTPTestRunner.java 2007-08-22
15:48:40 UTC (rev 8030)
@@ -47,36 +47,35 @@
public HTTPTestRunner()
{
super(JBOSS_BEANS_LOCATION);
-
- //
- init(null);
}
public HTTPTestRunner(NodeId[] nodeIds)
{
super(JBOSS_BEANS_LOCATION, nodeIds);
+ }
- //
- init(null);
+ protected final void init(String archiveName)
+ {
+ this.archiveName = archiveName;
}
- private final void init(String archiveName)
+ private String getArchiveName()
{
if (archiveName == null)
{
- TestParametrization abc = JUnitAdapter.getParametrization();
- this.archiveName = (String)abc.getParameterValue("archive").get();
+ TestParametrization parametrization = JUnitAdapter.getParametrization();
+ return (String)parametrization.getParameterValue("archive").get();
}
else
{
- this.archiveName = archiveName;
+ return archiveName;
}
}
public void startRunner() throws Exception
{
File root = new File(getArchivePath());
- File f = new File(root, archiveName);
+ File f = new File(root, getArchiveName());
deploy(f.toURL());
}
@@ -85,7 +84,7 @@
try
{
File root = new File(getArchivePath());
- File f = new File(root, archiveName);
+ File f = new File(root, getArchiveName());
undeploy(f.toURL());
}
catch (MalformedURLException e)
Show replies by date