summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbkolb2007-10-19 12:56:59 (EDT)
committer bkolb2007-10-19 12:56:59 (EDT)
commitaee06bf3e0faa8022849ece0c5e033ccfcdd32ec (patch)
treed26501d0a04b82b612a4221c5586ac97a6596d4b
parent51af06b6e605f5a463fa1527d7c8e9f75af49672 (diff)
downloadorg.eclipse.mwe-aee06bf3e0faa8022849ece0c5e033ccfcdd32ec.zip
org.eclipse.mwe-aee06bf3e0faa8022849ece0c5e033ccfcdd32ec.tar.gz
org.eclipse.mwe-aee06bf3e0faa8022849ece0c5e033ccfcdd32ec.tar.bz2
Fixed test for standalone and OSGi mode
-rw-r--r--tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/ReaderTest.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/ReaderTest.java b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/ReaderTest.java
index 3d03bf6..55b8b27 100644
--- a/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/ReaderTest.java
+++ b/tests/org.eclipse.emf.mwe.tests/src/org/eclipse/emf/mwe/tests/util/ReaderTest.java
@@ -8,6 +8,7 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.mwe.core.WorkflowContext;
import org.eclipse.emf.mwe.core.issues.IssuesImpl;
import org.eclipse.emf.mwe.core.monitor.NullProgressMonitor;
+import org.eclipse.emf.mwe.internal.core.MWEPlugin;
import org.eclipse.emf.mwe.internal.core.WorkflowContextDefaultImpl;
import org.eclipse.emf.mwe.utils.Reader;
import org.eclipse.emf.mwe.utils.StandaloneSetup;
@@ -17,8 +18,12 @@ public class ReaderTest extends TestCase {
Reader r = new Reader();
r.setFirstElementOnly(true);
r.setModelSlot("x");
- r.setUri("platform:/plugin/org.eclipse.emf.mwe.tests/testmodel.xmi");
- new StandaloneSetup().setPlatformUri(new File("..").getAbsolutePath());
+ if (MWEPlugin.getPlugin()==null) {
+ r.setUri("platform:/resource/org.eclipse.emf.mwe.tests/testmodel.xmi");
+ new StandaloneSetup().setPlatformUri(new File("..").getAbsolutePath());
+ } else {
+ r.setUri("platform:/plugin/org.eclipse.emf.mwe.tests/testmodel.xmi");
+ }
WorkflowContext ctx = new WorkflowContextDefaultImpl();
r.invoke(ctx, new NullProgressMonitor(), new IssuesImpl());