diff options
6 files changed, 0 insertions, 161 deletions
diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.wsdl.validation.tests/META-INF/MANIFEST.MF index d235e90e6..a24b92f47 100644 --- a/tests/org.eclipse.wst.wsdl.validation.tests/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.wst.wsdl.validation.tests/META-INF/MANIFEST.MF @@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.junit, org.eclipse.core.resources, - org.eclipse.jdt.core, org.eclipse.wst.wsdl.validation, org.eclipse.wst.ws.ui, org.eclipse.wst.command.env.core, diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/BaseTestCase.java b/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/BaseTestCase.java index c776597f4..f0c27d4be 100644 --- a/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/BaseTestCase.java +++ b/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/BaseTestCase.java @@ -13,29 +13,16 @@ package org.eclipse.wst.wsdl.validation.tests.internal; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.Reader; -import java.util.ArrayList; import java.util.Iterator; import java.util.List; import junit.framework.TestCase; -import org.eclipse.core.internal.resources.ProjectDescription; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Path; -import org.eclipse.jdt.core.IClasspathEntry; -import org.eclipse.jdt.core.IJavaProject; -import org.eclipse.jdt.core.JavaCore; import org.eclipse.wst.ws.internal.ui.plugin.WSUIPlugin; import org.eclipse.wst.ws.internal.ui.wsi.preferences.PersistentWSIContext; import org.eclipse.wst.wsdl.validation.internal.IValidationMessage; @@ -267,91 +254,4 @@ public class BaseTestCase extends TestCase return ""; } } - - protected IProject createProject(String projectName, String[] files, String[] projectNatures, IProject[] referencedProjects) - { - final IWorkspace workspace = ResourcesPlugin.getWorkspace(); - final IProject project = workspace.getRoot().getProject(projectName); - if(!project.exists()) - { - try - { - project.create(null); - } - catch(CoreException e) - { - fail("Could not create project " + projectName + e); - } - } - if(!project.isOpen()) - { - try - { - project.open(null); - } - catch(CoreException e) - { - fail("Could not open project " + projectName + e); - } - } - try - { - IProjectDescription projectDescription = new ProjectDescription(); - projectDescription.setName(projectName); - projectDescription.setNatureIds(projectNatures); - if(referencedProjects!=null) - { - projectDescription.setReferencedProjects(referencedProjects); - } - project.setDescription(projectDescription, null); - } - catch(Exception e) - { - fail("Unable to set project properties for project " + projectName + ". " + e); - } - IJavaProject javaProject = JavaCore.create(project); - try - { - javaProject.open(null); - List entries = new ArrayList(); - entries.add(JavaCore.newSourceEntry(new Path("default"))); - - if(referencedProjects != null) - { - for(int i = 0; i < referencedProjects.length; i++) - { - entries.add(JavaCore.newProjectEntry(referencedProjects[i].getLocation())); - } - } - javaProject.setRawClasspath((IClasspathEntry[])entries.toArray(new IClasspathEntry[entries.size()]), null); - } - catch(Exception e) - { - fail("Can't open Java project: " + e); - } - - if(files != null) - { - int numfiles = files.length; - for(int i = 0; i < numfiles; i++) - { - try - { - File file = new File(files[i]); - FileInputStream in = new FileInputStream(file); - IFile iFile = project.getFile(file.getName()); - if(!iFile.exists()) - { - iFile.create(in, true, null); - in.close(); - } - } - catch(Exception e) - { - fail("Unable to locate file " + files[i]); - } - } - } - return project; - } } diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/WSDLTest.java b/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/WSDLTest.java index 9d78f054d..6949568a5 100644 --- a/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/WSDLTest.java +++ b/tests/org.eclipse.wst.wsdl.validation.tests/src/org/eclipse/wst/wsdl/validation/tests/internal/WSDLTest.java @@ -194,42 +194,6 @@ public class WSDLTest extends BaseTestCase runTest(testfile, loglocation, idealloglocation); } - - /** - * Test /WSDL/Import/ImportingUsingClasspath.wsdl - */ -// public void testImportingUsingClasspath() -// { -// final IWorkspace workspace = ResourcesPlugin.getWorkspace(); -// String testname = "ImportingUsingClasspath"; -// String importingfile = PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + WSDL_DIR + "Import/" + "ImportingUsingClasspath.wsdl"; -// importingfile = importingfile.replace('/','\\'); -// importingfile = importingfile.substring(5); -// String importedfile = PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + WSDL_DIR + "Import/" + "ImportedUsingClasspath.wsdl"; -// importedfile = importedfile.replace('/','\\'); -// importedfile = importedfile.substring(5); -// String loglocation = PLUGIN_ABSOLUTE_PATH + GENERATED_RESULTS_DIR + WSDL_DIR + "Import/" + testname + ".wsdl-log"; -// String idealloglocation = PLUGIN_ABSOLUTE_PATH + IDEAL_RESULTS_DIR + WSDL_DIR + "Import/" + testname + ".wsdl-log"; -// -// String projectName = "Project1"; -// String projectName2 = "Project2"; -// // Create a simple project for ImportedSchemaWithSchemaImport test. -// IProject project2 = createProject(projectName2, new String[]{importedfile},new String[]{"org.eclipse.jdt.core.javanature", "com.ibm.wtp.jca.ConnectorNature"}, null); -// IProject project1 = createProject(projectName, new String[]{importingfile},new String[]{"org.eclipse.jdt.core.javanature", "com.ibm.wtp.jca.ConnectorNature"}, new IProject[]{project2}); -// -// String testfile = "file:/" + project1.getFile("ImportingUsingClasspath.wsdl").getLocation().toString(); -// runTest(testfile, loglocation, idealloglocation); -// -// try -// { -// project1.delete(true, true, null); -// project2.delete(true, true, null); -// } -// catch(Exception e) -// { -// } -// } - /** * Test /WSDL/Import/AlphabeticalOrderOfImports/ImportOneAndTwo.wsdl */ diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/idealResults/WSDL/Import/ImportingUsingClasspath.wsdl-log b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/idealResults/WSDL/Import/ImportingUsingClasspath.wsdl-log deleted file mode 100644 index aa2b36149..000000000 --- a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/idealResults/WSDL/Import/ImportingUsingClasspath.wsdl-log +++ /dev/null @@ -1,8 +0,0 @@ -number of errors : 0 -number of warnings : 0 - -------------error list------------------------------------------- -(none) -------------warning list----------------------------------------- -(none) ------------------------------------------------------------------ diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/WSDL/Import/ImportedUsingClasspath.wsdl b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/WSDL/Import/ImportedUsingClasspath.wsdl deleted file mode 100644 index 51e5655a5..000000000 --- a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/WSDL/Import/ImportedUsingClasspath.wsdl +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<wsdl:definitions xmlns:tns="http://tempuri.org/ImportedUsingClasspath/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ImportedUsingClasspath" targetNamespace="http://tempuri.org/ImportedUsingClasspath/"> - <wsdl:message name="message"> - <wsdl:part name="message" type="xsd:string"></wsdl:part> - </wsdl:message> -</wsdl:definitions> diff --git a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/WSDL/Import/ImportingUsingClasspath.wsdl b/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/WSDL/Import/ImportingUsingClasspath.wsdl deleted file mode 100644 index a1f5989f1..000000000 --- a/tests/org.eclipse.wst.wsdl.validation.tests/testresources/samples/WSDL/Import/ImportingUsingClasspath.wsdl +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<wsdl:definitions xmlns:tns="http://tempuri.org/ImportingUsingClasspath/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ImportingUsingClasspath" targetNamespace="http://tempuri.org/ImportingUsingClasspath/" xmlns:classpath="http://tempuri.org/ImportedUsingClasspath/"> - <wsdl:import namespace="http://tempuri.org/ImportedUsingClasspath/" location="ImportedUsingClasspath.wsdl"></wsdl:import> - <wsdl:portType name="portType"> - <wsdl:operation name="operation"> - <wsdl:input message="classpath:message"></wsdl:input> - <wsdl:output message="classpath:message"></wsdl:output> - </wsdl:operation> - </wsdl:portType> -</wsdl:definitions> |