|
From: <caw...@us...> - 2007-01-24 15:38:28
|
Revision: 1874
http://svn.sourceforge.net/rubyeclipse/?rev=1874&view=rev
Author: cawilliams
Date: 2007-01-24 07:38:21 -0800 (Wed, 24 Jan 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching.tests/plugin.xml
trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
Modified: trunk/org.rubypeople.rdt.launching.tests/plugin.xml
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/plugin.xml 2007-01-24 15:31:18 UTC (rev 1873)
+++ trunk/org.rubypeople.rdt.launching.tests/plugin.xml 2007-01-24 15:38:21 UTC (rev 1874)
@@ -20,6 +20,7 @@
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.rubypeople.eclipse.testutils"/>
<import plugin="org.rubypeople.rdt.core"/>
+ <import plugin="org.rubypeople.rdt.core.tests"/>
</requires>
</plugin>
Modified: trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java
===================================================================
--- trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-01-24 15:31:18 UTC (rev 1873)
+++ trunk/org.rubypeople.rdt.launching.tests/src/org/rubypeople/rdt/internal/launching/TC_RunnerLaunching.java 2007-01-24 15:38:21 UTC (rev 1874)
@@ -6,8 +6,6 @@
import java.util.List;
import java.util.Map;
-import junit.framework.TestCase;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -22,14 +20,15 @@
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.Launch;
import org.rubypeople.eclipse.shams.debug.core.ShamLaunchConfigurationType;
-import org.rubypeople.eclipse.testutils.ResourceTools;
+import org.rubypeople.rdt.core.IRubyProject;
import org.rubypeople.rdt.core.RubyCore;
+import org.rubypeople.rdt.core.tests.ModifyingResourceTest;
import org.rubypeople.rdt.launching.IVMInstall;
import org.rubypeople.rdt.launching.IVMInstallType;
import org.rubypeople.rdt.launching.RubyRuntime;
import org.rubypeople.rdt.launching.VMStandin;
-public class TC_RunnerLaunching extends TestCase {
+public class TC_RunnerLaunching extends ModifyingResourceTest {
private final static String PROJECT_NAME = "Simple Project";
private final static String RUBY_LIB_DIR = "someRubyDir"; // dir inside project
@@ -40,6 +39,7 @@
private static final String VM_TYPE_ID = "org.rubypeople.rdt.launching.StandardVMType";
private IVMInstallType vmType;
+ private IRubyProject project;
public TC_RunnerLaunching(String name) {
super(name);
@@ -54,8 +54,15 @@
standin.setInstallLocation(new File("C:\ruby"));
IVMInstall real = standin.convertToRealVM();
RubyRuntime.setDefaultVMInstall(real, null, true);
+ project = createRubyProject(PROJECT_NAME);
}
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ deleteProject(PROJECT_NAME);
+ }
+
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
@@ -102,11 +109,8 @@
}
public void launch(boolean debug) throws Exception {
+ IVMInstall interpreter = new VMStandin(vmType, "");
- IProject project = ResourceTools.createProject(PROJECT_NAME);
-
- IVMInstall interpreter = new VMStandin((IVMInstallType)null, "");
-
ILaunchConfiguration configuration = new ShamLaunchConfiguration();
ILaunch launch = new Launch(configuration, debug ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE, null);
ILaunchConfigurationType launchConfigurationType =
@@ -119,7 +123,7 @@
null);
assertEquals("One process has been spawned", 1, launch.getProcesses().length);
- List expected = getCommandLine(project, debug);
+ List expected = getCommandLine(project.getProject(), debug);
String[] actual = interpreter.getVMArguments();
if (debug) {
// we must cheat with the first argument, because it is a temporary file which
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|