[nobug] API FVT Test+ Committed for BLB
diff --git a/tests/org.eclipse.wst.common.tests/frameworktests/org/eclipse/wst/common/frameworks/artifactedit/tests/ArtifactEditTest.java b/tests/org.eclipse.wst.common.tests/frameworktests/org/eclipse/wst/common/frameworks/artifactedit/tests/ArtifactEditTest.java
index a1b2b9e..7fad34a 100644
--- a/tests/org.eclipse.wst.common.tests/frameworktests/org/eclipse/wst/common/frameworks/artifactedit/tests/ArtifactEditTest.java
+++ b/tests/org.eclipse.wst.common.tests/frameworktests/org/eclipse/wst/common/frameworks/artifactedit/tests/ArtifactEditTest.java
@@ -3,6 +3,7 @@
import java.io.IOException;
+import java.net.MalformedURLException;
import java.net.URL;
import junit.framework.TestCase;
@@ -10,6 +11,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
@@ -26,7 +28,6 @@
import org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext;
import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelEvent;
import org.eclipse.wst.common.internal.emfworkbench.integration.EditModelListener;
-import org.eclipse.wst.common.tests.CommonTestsPlugin;
@@ -42,7 +43,7 @@
private ArtifactEdit artifactEditForRead;
private ArtifactEdit artifactEditForWrite;
private EditModelListener emListener;
- private Path zipFilePath = new Path("frameworktests/org/eclipse/wst/common/frameworks/artifactedit/tests/TestArtifactEdit.zip");
+ private Path zipFilePath = new Path("/frameworktests/org/eclipse/wst/common/frameworks/artifactedit/tests/TestArtifactEdit.zip");
private IProject project;
@@ -109,9 +110,20 @@
ProjectUnzipUtil util = new ProjectUnzipUtil(localZipPath, new String[]{PROJECT_NAME});
return util.createProjects();
}
+
+
private IPath getLocalPath() {
- URL url = CommonTestsPlugin.instance.find(zipFilePath);
+ IPluginDescriptor pluginDescriptor = Platform.getPluginRegistry().getPluginDescriptor("org.eclipse.wst.common.tests");
+ URL url = pluginDescriptor.getInstallURL();
+ try {
+ url = new URL(url.toString()+ zipFilePath);
+ } catch (MalformedURLException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+
+
try {
url = Platform.asLocalURL(url);
} catch (IOException e) {