summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-08-08 00:43:01 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2008-08-08 00:43:01 +0000
commitdc6a964cbaefa171b1dee6311676df8316f657cf (patch)
tree28deb7356db12960cc6558616459fd9cfd5ea110 /java/sca
parentfc1b59e0d44eb5f451208e5446f5c316ceabdef8 (diff)
Cleanup imports
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@683778 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/java/sca/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java b/java/sca/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java
index 4cf9380ae3..82700b5b47 100644
--- a/java/sca/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java
+++ b/java/sca/tools/maven/maven-osgi-junit/src/main/java/org/apache/tuscany/tools/sca/osgi/junit/plugin/OSGiJUnitMojo.java
@@ -26,7 +26,6 @@ import java.util.HashSet;
import java.util.List;
import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.ArtifactResolver;
@@ -35,8 +34,6 @@ import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.apache.tuscany.sca.node.osgi.launcher.FelixOSGiHost;
import org.apache.tuscany.sca.node.osgi.launcher.LauncherBundleActivator;
-import org.junit.runner.JUnitCore;
-import org.junit.runner.Request;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -151,9 +148,9 @@ public class OSGiJUnitMojo extends AbstractMojo {
public int runTestCase(ClassLoader testClassLoader, Class testClass) throws Exception {
if (testClass.getName().endsWith("TestCase")) {
- Class coreClass = Class.forName(JUnitCore.class.getName(), true, testClassLoader);
+ Class coreClass = Class.forName("org.junit.runner.JUnitCore", true, testClassLoader);
Object core = coreClass.newInstance();
- Class reqClass = Class.forName(Request.class.getName(), true, testClassLoader);
+ Class reqClass = Class.forName("org.junit.runner.Request", true, testClassLoader);
Method aClass = reqClass.getMethod("aClass", Class.class);
Object req = aClass.invoke(null, testClass);
Method run = coreClass.getMethod("run", reqClass);
@@ -163,7 +160,7 @@ public class OSGiJUnitMojo extends AbstractMojo {
List failureList = (List)result.getClass().getMethod("getFailures").invoke(result);
int failures = 0, errors = 0;
- Class errorClass = Class.forName(AssertionFailedError.class.getName(), true, testClassLoader);
+ Class errorClass = Class.forName("junit.framework.AssertionFailedError", true, testClassLoader);
for (Object f : failureList) {
Object ex = f.getClass().getMethod("getException").invoke(f);
if (errorClass.isInstance(ex)) {