This commit was manufactured by cvs2svn to create tag 'v20050606'.
diff --git a/tests/org.eclipse.wst.common.tests.collector/.classpath b/tests/org.eclipse.wst.common.tests.collector/.classpath
deleted file mode 100644
index 74cb0c8..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="collector"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.common.tests.collector/.cvsignore b/tests/org.eclipse.wst.common.tests.collector/.cvsignore
deleted file mode 100644
index c5e82d7..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.common.tests.collector/.project b/tests/org.eclipse.wst.common.tests.collector/.project
deleted file mode 100644
index 5b816ca..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/.project
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common.tests.collector</name>
- <comment></comment>
- <projects>
- <project>org.junit</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.common.tests.collector/build.properties b/tests/org.eclipse.wst.common.tests.collector/build.properties
deleted file mode 100644
index b0d96d8..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-bin.includes = plugin.xml,\
- runtime/collector.jar
-source.runtime/collector.jar = collector/
-src.includes = plugin.xml
-output.runtime/collector.jar = bin/
diff --git a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/SuiteHelper.java b/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/SuiteHelper.java
deleted file mode 100644
index 718d7b4..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/SuiteHelper.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package org.eclipse.wst.common.tests.collector;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class SuiteHelper {
-
- private Hashtable allTests = new Hashtable();
-
- public SuiteHelper(TestSuite suite) {
- addTest(suite);
- }
-
- private void addTest(Test test) {
- if (test instanceof TestSuite) {
- Enumeration tests = ((TestSuite) test).tests();
- while (tests.hasMoreElements()) {
- Test t = (Test) tests.nextElement();
- allTests.put(t.toString(), t);
- }
- return;
- }
- allTests.put(test.toString(), test);
- }
-
- public String[] getAllTests() {
- ArrayList testList = new ArrayList();
- Enumeration enumeration = allTests.keys();
- while (enumeration.hasMoreElements()) {
- testList.add(enumeration.nextElement());
- }
- Collections.sort(testList, new Comparator() {
- public int compare(Object o1, Object o2) {
- return ((String) o1).compareTo(((String) o2));
- }
- });
-
- String[] strArray = new String[testList.size()];
- for (int i = 0; i < strArray.length; i++) {
- strArray[i] = (String) testList.get(i);
- }
-
- return strArray;
- }
-
- public TestSuite buildSuite(String[] completeTests, String[] partialTests) {
- TestSuite suite = new TestSuite();
- for (int i = 0; i < completeTests.length; i++) {
- suite.addTest((Test) allTests.get(completeTests[i]));
- }
- for (int i = 0; i < partialTests.length; i++) {
- suite.addTest(getTest(partialTests[i]));
- }
- return suite;
- }
-
- public String[] getTestMethods(String testName) {
- ArrayList methodList = new ArrayList();
- Test test = (Test) allTests.get(testName);
- if (test instanceof TestSuite) {
- Enumeration testsEnum = ((TestSuite) test).tests();
- while (testsEnum.hasMoreElements()) {
- Test t = (Test) testsEnum.nextElement();
- methodList.add(t.toString());
- }
- }
-
- Collections.sort(methodList, new Comparator() {
- public int compare(Object o1, Object o2) {
- return ((String) o1).compareTo(((String) o2));
- }
- });
-
- String[] strArray = new String[methodList.size()];
- for (int i = 0; i < strArray.length; i++) {
- strArray[i] = (String) methodList.get(i);
- }
-
- return strArray;
- }
-
- private Test getSubTest(TestSuite suite, String testName) {
- if (null != suite) {
- Enumeration tests = suite.tests();
- while (tests.hasMoreElements()) {
- Test t = (Test) tests.nextElement();
- if (t.toString().equals(testName)) {
- return t;
- }
- }
- }
- return null;
- }
-
- /**
- * Returns a TestSuite to run
- */
- private Test getTest(String testName) {
- int firstIndex = testName.indexOf(".");
- String suiteName = testName.substring(0, firstIndex);
- String subTestName = testName.substring(firstIndex + 1);
-
- //check the obvious suite first
- TestSuite suite = (TestSuite) allTests.get(suiteName);
- Test test = getSubTest(suite, subTestName);
- if (test != null) {
- return test;
- }
- //otherwise check all suites
- Enumeration keys = allTests.keys();
- while (keys.hasMoreElements()) {
- String key = (String) keys.nextElement();
- if (testName.startsWith(key)) {
- suite = (TestSuite) allTests.get(key);
- subTestName = testName.substring(key.length() + 1);
- test = getSubTest(suite, subTestName);
- if (test != null) {
- return test;
- }
- }
- }
-
- return null;
-
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/SuiteTestRunner.java b/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/SuiteTestRunner.java
deleted file mode 100644
index 4f7b7c7..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/SuiteTestRunner.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.wst.common.tests.collector;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import junit.swingui.TestRunner;
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class SuiteTestRunner extends TestRunner {
-
- private TestSuite suite;
-
- /**
- * PluginTestRunner constructor comment.
- */
- public SuiteTestRunner(TestSuite suiteToRun) {
- super();
- suite = suiteToRun;
- }
-
- /**
- * Only return the specified suite
- */
- public Test getTest(String suiteClassName) {
- return suite;
- }
-
- /**
- * called by the gui
- */
- public void launch() {
- start();
- }
-
- public void start() {
- String name = "dynamic test";
- fFrame = createUI(name);
- fFrame.pack();
- fFrame.setVisible(true);
- setSuite(name);
- runSuite();
- }
-
- /*
- * @see TestRunner#terminate()
- */
- public void terminate() {
- fFrame.dispose();
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorActionDelegate.java b/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorActionDelegate.java
deleted file mode 100644
index cffd76a..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorActionDelegate.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package org.eclipse.wst.common.tests.collector;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class TestCollectorActionDelegate implements IWorkbenchWindowActionDelegate {
-
- /**
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
- */
- public void dispose() {
- }
-
- /**
- * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
- */
- public void init(IWorkbenchWindow window) {
- }
-
- /**
- * @see org.eclipse.ui.IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- Shell shell = new Shell();
- GridLayout gridLayout = new GridLayout();
- shell.setLayout(gridLayout);
- shell.setText("Test Collector");
- TestCollectorGUI testCollectorGUI = new TestCollectorGUI(shell, SWT.NULL);
- GridData gridData = new GridData(GridData.FILL_BOTH);
- gridData.horizontalSpan = 1;
- testCollectorGUI.setLayoutData(gridData);
-
- shell.setSize(500, 500);
- shell.open();
- }
-
-
- /**
- * @see org.eclipse.ui.IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorGUI.java b/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorGUI.java
deleted file mode 100644
index 7f335e2..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorGUI.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Created on Mar 6, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.tests.collector;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.Hashtable;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class TestCollectorGUI extends Composite implements ModifyListener {
-
- private TestCollectorInnerPanes innerPanes = null;
- private Combo combo = null;
-
- private Hashtable testSuites = new Hashtable();
- private Hashtable classLoaders = new Hashtable();
-
- /**
- * @param parent
- * @param style
- */
- public TestCollectorGUI(Composite parent, int style) {
- super(parent, style);
-
- loadConfiguration();
-
- createPartControl();
- }
-
- private void loadConfiguration() {
- TestCollectorPlugin plugin = TestCollectorPlugin.instance;
- IExtension[] suitesExtensions = plugin.suitesExtensionPoint.getExtensions();
-
- for (int i = 0; i < suitesExtensions.length; i++) {
- IExtension extension = suitesExtensions[i];
- IConfigurationElement[] tests = extension.getConfigurationElements();
- for (int j = 0; j < tests.length; j++) {
- try {
- IConfigurationElement element = tests[j];
- String suiteName = element.getAttribute("name");
- String suiteClass = element.getAttribute("class");
- testSuites.put(suiteName, suiteClass);
- classLoaders.put(suiteName, extension.getDeclaringPluginDescriptor().getPluginClassLoader());
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- }
-
- public void createPartControl() {
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- setLayout(gridLayout);
-
- GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalSpan = 1;
-
- combo = new Combo(this, SWT.READ_ONLY);
- Enumeration keys = testSuites.keys();
- ArrayList arrayList = new ArrayList();
- while (keys.hasMoreElements()) {
- arrayList.add(keys.nextElement());
- }
-
- Collections.sort(arrayList, new Comparator() {
- public int compare(Object o1, Object o2) {
- return ((String) o1).compareTo(((String) o2));
- }
- });
-
- for (int i = 0; i < arrayList.size(); i++) {
- combo.add((String) arrayList.get(i));
- }
- combo.setLayoutData(gridData);
- combo.addModifyListener(this);
- if (combo.getItemCount() > 0) {
- combo.select(0);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
- */
- public void modifyText(ModifyEvent e) {
- if (e.getSource() == combo) {
- updateCombo(e);
- }
- }
-
- private void updateCombo(ModifyEvent e) {
- if (null != innerPanes) {
- innerPanes.dispose();
- }
- try {
- String className = (String) testSuites.get(combo.getText());
- ClassLoader classLoader = (ClassLoader) classLoaders.get(combo.getText());
- TestSuite suite = (TestSuite) classLoader.loadClass(className).newInstance();
-
- innerPanes = new TestCollectorInnerPanes(this, SWT.NULL, new SuiteHelper(suite));
-
- GridData gridData = new GridData(GridData.FILL_BOTH);
- gridData.horizontalSpan = 1;
- innerPanes.setLayoutData(gridData);
- layout();
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorInnerPanes.java b/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorInnerPanes.java
deleted file mode 100644
index a51bae5..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorInnerPanes.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package org.eclipse.wst.common.tests.collector;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import junit.framework.TestSuite;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-/**
- * @author jsholl
- *
- * To change this generated comment edit the template variable "typecomment":
- * Window>Preferences>Java>Templates.
- * To enable and disable the creation of type comments go to
- * Window>Preferences>Java>Code Generation.
- */
-public class TestCollectorInnerPanes extends Composite {
-
- private Table testClassTable;
- private Table testMethodTable;
-
- private Button launchTestButton;
-
- private SuiteHelper pluginTestLoader;
-
- private HashSet partialSetHash = new HashSet();
- private Hashtable shortToFullHashtable = new Hashtable();
- private Hashtable fullToShortHashtable = new Hashtable();
-
- public TestCollectorInnerPanes(Composite parent, int style, SuiteHelper loader) {
- super(parent, style);
- pluginTestLoader = loader;
- createPartControl();
- }
-
- public void createPartControl() {
- GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 1;
- gridLayout.marginWidth = 0;
- gridLayout.marginHeight = 0;
- setLayout(gridLayout);
- GridData gridData = null;
-
- Group tableGroup = new Group(this, SWT.NULL);
- GridLayout tableGroupLayout = new GridLayout();
- tableGroupLayout.makeColumnsEqualWidth = true;
- tableGroupLayout.numColumns = 1;
- tableGroupLayout.marginWidth = 0;
- tableGroupLayout.marginHeight = 0;
- tableGroup.setLayout(tableGroupLayout);
- tableGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- SashForm splitView = new SashForm(tableGroup, SWT.HORIZONTAL);
- splitView.setBackground(getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
-
- gridData = new GridData(GridData.FILL_BOTH);
- gridData.horizontalSpan = 2;
- splitView.setLayoutData(gridData);
-
- Composite leftComposite = new Composite(splitView, SWT.NONE);
- GridLayout leftLayout = new GridLayout();
- leftLayout.numColumns = 1;
- leftComposite.setLayout(leftLayout);
- Label label2 = new Label(leftComposite, SWT.NULL);
- gridData = new GridData();
- gridData.horizontalAlignment = GridData.CENTER;
- label2.setLayoutData(gridData);
- label2.setText("Test Suites");
-
- Composite rightComposite = new Composite(splitView, SWT.NONE);
- GridLayout rightLayout = new GridLayout();
- rightLayout.numColumns = 1;
- rightComposite.setLayout(rightLayout);
- Label label3 = new Label(rightComposite, SWT.NULL);
- gridData = new GridData();
- gridData.horizontalAlignment = GridData.CENTER;
- label3.setLayoutData(gridData);
- label3.setText("Tests");
-
- testClassTable = new Table(leftComposite, SWT.CHECK);
- testClassTable.setBackground(getBackground());
- gridData = new GridData(GridData.FILL_BOTH);
- testClassTable.setLayoutData(gridData);
- String[] allTests = pluginTestLoader.getAllTests();
- for (int i = 0; i < allTests.length; i++) {
- TableItem tableItem = new TableItem(testClassTable, SWT.NULL);
- tableItem.setText(allTests[i]);
- }
- testClassTable.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- TableItem item = (TableItem) e.item;
- String testName = item.getText();
- updateMethodTable(testName, pluginTestLoader.getTestMethods(testName));
- testClassTable.setSelection(new TableItem[] { item });
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
-
- });
-
- Label label = new Label(leftComposite, SWT.SEPARATOR | SWT.HORIZONTAL);
- label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Button selectAllCheckbox = new Button(leftComposite, SWT.CHECK);
- selectAllCheckbox.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- selectAllCheckbox.setText("Select All");
- selectAllCheckbox.addSelectionListener(new SelectionAdapter(){
- public void widgetSelected(SelectionEvent e) {
- boolean checked = selectAllCheckbox.getSelection();
- TableItem [] items = testClassTable.getItems();
- for(int i=0;i<items.length; i++){
- items[i].setChecked(checked);
- }
- }
- });
-
- testMethodTable = new Table(rightComposite, SWT.CHECK);
- testMethodTable.setBackground(getBackground());
- gridData = new GridData(GridData.FILL_BOTH);
- testMethodTable.setLayoutData(gridData);
-
- launchTestButton = new Button(this, SWT.PUSH);
- gridData = new GridData(GridData.FILL_HORIZONTAL);
- gridData.horizontalAlignment = GridData.CENTER;
- gridData.horizontalSpan = 2;
- launchTestButton.setLayoutData(gridData);
- launchTestButton.setText("Run Tests");
- launchTestButton.addSelectionListener(new SelectionListener() {
- public void widgetSelected(SelectionEvent e) {
- SuiteTestRunner runner = new SuiteTestRunner(buildSuite());
- runner.launch();
- }
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
- }
-
- private void storeMethodsTable() {
- TableItem[] items = testMethodTable.getItems();
- for (int i = 0; null != items && i < items.length; i++) {
- String partialTestName = (String)shortToFullHashtable.get(items[i].getText());
- if (items[i].getChecked() && !partialSetHash.contains(partialTestName)) {
- partialSetHash.add(partialTestName);
- } else if (!items[i].getChecked() && partialSetHash.contains(partialTestName)) {
- partialSetHash.remove(partialTestName);
- }
- }
- }
-
- private void updateMethodTable(String testName, String[] methodArray) {
- storeMethodsTable();
- testMethodTable.removeAll();
- shortToFullHashtable.clear();
- fullToShortHashtable.clear();
-
- for (int i = 0; null != methodArray && i < methodArray.length; i++) {
- String partialTestName = testName + "." + methodArray[i];
- int endIndex = methodArray[i].indexOf('(');
- String methodName = endIndex > 0 ? methodArray[i].substring(0, endIndex) : methodArray[i];
- shortToFullHashtable.put(methodName, partialTestName);
- fullToShortHashtable.put(partialTestName, methodName);
- TableItem tableItem = new TableItem(testMethodTable, SWT.NULL);
- tableItem.setText(methodName);
- tableItem.setChecked(partialSetHash.contains(partialTestName));
- }
-
- }
-
- private TestSuite buildSuite() {
- ArrayList completeTests = new ArrayList();
- TableItem[] items = testClassTable.getItems();
- for (int i = 0; i < items.length; i++) {
- if (items[i].getChecked()) {
- completeTests.add(items[i].getText());
- }
- }
-
- String[] completeArray = new String[completeTests.size()];
- for (int i = 0; i < completeArray.length; i++) {
- completeArray[i] = (String) completeTests.get(i);
- }
-
- ArrayList partialTests = new ArrayList();
- storeMethodsTable();
- Iterator iterator = partialSetHash.iterator();
- while (iterator.hasNext()) {
- partialTests.add(iterator.next());
- }
-
- String[] partialArray = new String[partialTests.size()];
- for (int i = 0; i < partialArray.length; i++) {
- partialArray[i] = (String) partialTests.get(i);
- }
-
- return pluginTestLoader.buildSuite(completeArray, partialArray);
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorPlugin.java b/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorPlugin.java
deleted file mode 100644
index ed3e6ad..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/collector/org/eclipse/wst/common/tests/collector/TestCollectorPlugin.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Created on Mar 6, 2003
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.tests.collector;
-
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.Plugin;
-
-/**
- * @author jsholl
- *
- * To change this generated comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class TestCollectorPlugin extends Plugin {
-
-
- public static TestCollectorPlugin instance = null;
- public IExtensionPoint suitesExtensionPoint = null;
-
-
- public TestCollectorPlugin getInstance(){
- return instance;
- }
-
- /**
- * @param descriptor
- */
- public TestCollectorPlugin(IPluginDescriptor descriptor) {
- super(descriptor);
- instance = this;
- suitesExtensionPoint = descriptor.getExtensionPoint("suites");
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.collector/plugin.xml b/tests/org.eclipse.wst.common.tests.collector/plugin.xml
deleted file mode 100644
index 5bdd771..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/plugin.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.common.tests.collector"
- name="org.eclipse.wst.common.tests.collector"
- version="1.0.0"
- class="org.eclipse.wst.common.tests.collector.TestCollectorPlugin">
-
- <runtime>
- <library name="runtime/collector.jar"/>
- </runtime>
- <requires>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime.compatibility"/>
- </requires>
- <extension-point id="suites" name="suites" schema="schema/suites.exsd"/>
-
-
-
- <extension
- point="org.eclipse.ui.actionSets">
- <actionSet
- label="Test Collector"
- visible="true"
- id="testCollector">
- <menu
- label="WTP Tests"
- path="additions"
- id="org.eclipse.wst.common.tests.collector.testsMenu">
- <separator
- name="group1">
- </separator>
- </menu>
- <action
- label="Open"
- tooltip="Test Collector"
- class="org.eclipse.wst.common.tests.collector.TestCollectorActionDelegate"
- menubarPath="org.eclipse.wst.common.tests.collector.testsMenu/group1"
- id="org.eclipse.wst.common.tests.collector.testsAction">
- </action>
- </actionSet>
- </extension>
-
-</plugin>
diff --git a/tests/org.eclipse.wst.common.tests.collector/schema/suites.exsd b/tests/org.eclipse.wst.common.tests.collector/schema/suites.exsd
deleted file mode 100644
index dfec3c5..0000000
--- a/tests/org.eclipse.wst.common.tests.collector/schema/suites.exsd
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.wst.common.tests.collector">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.wst.common.tests.collector" id="suites" name="suites"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="suite"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="suite">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/tests/org.eclipse.wst.common.tests.ui/.classpath b/tests/org.eclipse.wst.common.tests.ui/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.common.tests.ui/.cvsignore b/tests/org.eclipse.wst.common.tests.ui/.cvsignore
deleted file mode 100644
index 2521e52..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-temp.folder
-build.xml
-ui.jar
diff --git a/tests/org.eclipse.wst.common.tests.ui/.project b/tests/org.eclipse.wst.common.tests.ui/.project
deleted file mode 100644
index 8efe78d..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.common.tests.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.common.tests.ui/build.properties b/tests/org.eclipse.wst.common.tests.ui/build.properties
deleted file mode 100644
index 1c52d49..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/build.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-source.ui.jar = src/
-output.ui.jar = bin/
-bin.includes = plugin.xml,\
- ui.jar
diff --git a/tests/org.eclipse.wst.common.tests.ui/plugin.xml b/tests/org.eclipse.wst.common.tests.ui/plugin.xml
deleted file mode 100644
index 0ca05f2..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/plugin.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.common.tests.ui"
- name="Ui Plug-in"
- version="1.0.0"
- provider-name=""
- class="org.eclipse.wst.common.tests.ui.UiPlugin">
-
- <runtime>
- <library name="ui.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.wst.common.frameworks.ui"/>
- <import plugin="org.eclipse.wst.common.tests"/>
- </requires>
-
- <extension
- point="org.eclipse.wst.common.tests.collector.suites">
- <suite
- class="org.eclipse.wst.common.tests.ui.DataModelUIAPITests"
- name="DataModel UI API Tests">
- </suite>
- </extension>
- <extension
- point="org.eclipse.wst.common.frameworks.ui.DataModelWizardExtension">
- <DataModelWizard
- class="org.eclipse.wst.common.tests.ui.TestDataModelWizard"
- id="org.eclipse.wst.common.frameworks.datamodel.tests.ITestDataModel"/>
- </extension>
-
-
-</plugin>
diff --git a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/DataModelUIAPITests.java b/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/DataModelUIAPITests.java
deleted file mode 100644
index caf613e..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/DataModelUIAPITests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.tests.ui;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.common.tests.SimpleTestSuite;
-
-/**
- * @author jsholl
- *
- * TODO To change the template for this generated type comment go to Window - Preferences - Java -
- * Code Style - Code Templates
- */
-public class DataModelUIAPITests extends TestSuite {
-
- public static Test suite() {
- return new DataModelUIAPITests();
- }
-
- public DataModelUIAPITests() {
- super();
- addTest(new SimpleTestSuite(DataModelUIFactoryTest.class));
- }
-}
diff --git a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/DataModelUIFactoryTest.java b/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/DataModelUIFactoryTest.java
deleted file mode 100644
index a724d9a..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/DataModelUIFactoryTest.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.tests.ui;
-
-import junit.framework.TestCase;
-
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.tests.ITestDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.tests.TestDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizardFactory;
-
-public class DataModelUIFactoryTest extends TestCase {
-
- public void testValidExtensionID() {
- IDataModel dataModel = DataModelFactory.createDataModel("org.eclipse.wst.common.frameworks.datamodel.tests.ITestDataModel");
- assertTrue(dataModel.isProperty(ITestDataModel.FOO));
- DataModelWizard wizard = DataModelWizardFactory.createWizard("org.eclipse.wst.common.frameworks.datamodel.tests.ITestDataModel");
- assertNotNull(wizard);
- assertNotNull(wizard.getDataModel());
- }
-
-
- public void testValidExtensionClass() {
- IDataModel dataModel = DataModelFactory.createDataModel(ITestDataModel.class);
- assertTrue(dataModel.isProperty(ITestDataModel.FOO));
- DataModelWizard wizard = DataModelWizardFactory.createWizard(ITestDataModel.class);
- assertNotNull(wizard);
- assertNotNull(wizard.getDataModel());
- }
-
- public void testValidExtensionInstance() {
- int startInstanceCount = TestDataModelProvider.getInstanceCount();
- IDataModel dataModel = DataModelFactory.createDataModel(new TestDataModelProvider());
- assertTrue(dataModel.isProperty(ITestDataModel.FOO));
- DataModelWizard wizard = DataModelWizardFactory.createWizard(dataModel);
- assertNotNull(wizard);
- assertTrue(dataModel == wizard.getDataModel());
- int endInstanceCount = TestDataModelProvider.getInstanceCount();
- assertEquals(1, endInstanceCount-startInstanceCount);
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/TestDataModelWizard.java b/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/TestDataModelWizard.java
deleted file mode 100644
index b6044c4..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/TestDataModelWizard.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.common.tests.ui;
-
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-import org.eclipse.wst.common.frameworks.datamodel.tests.TestDataModelProvider;
-import org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard;
-
-public class TestDataModelWizard extends DataModelWizard {
-
- public TestDataModelWizard() {
- super();
- }
-
- public TestDataModelWizard(IDataModel dataModel) {
- super(dataModel);
- }
-
- protected IDataModelProvider getDefaultProvider() {
- return new TestDataModelProvider();
- }
-
-}
diff --git a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/UiPlugin.java b/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/UiPlugin.java
deleted file mode 100644
index 6724e83..0000000
--- a/tests/org.eclipse.wst.common.tests.ui/src/org/eclipse/wst/common/tests/ui/UiPlugin.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.eclipse.wst.common.tests.ui;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class UiPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static UiPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public UiPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static UiPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = UiPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.common.tests.ui.UiPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.wst.common.tests.ui", path);
- }
-}
diff --git a/tests/org.eclipse.wst.internet.cache.tests/.classpath b/tests/org.eclipse.wst.internet.cache.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.internet.cache.tests/.cvsignore b/tests/org.eclipse.wst.internet.cache.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.wst.internet.cache.tests/.project b/tests/org.eclipse.wst.internet.cache.tests/.project
deleted file mode 100644
index fb4b067..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.internet.cache.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.internet.cache.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.wst.internet.cache.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index 5ecafd3..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,16 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Cache Tests Plug-in
-Bundle-SymbolicName: org.eclipse.wst.internet.cache.tests
-Bundle-Version: 1.0.0
-Bundle-ClassPath: tests.jar
-Bundle-Activator: org.eclipse.wst.internet.cache.tests.internal.CacheTestsPlugin
-Bundle-Vendor: Eclipse
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.junit,
- org.eclipse.wst.internet.cache,
- org.eclipse.core.resources,
- org.eclipse.wst.common.uriresolver
-Eclipse-AutoStart: true
diff --git a/tests/org.eclipse.wst.internet.cache.tests/build.properties b/tests/org.eclipse.wst.internet.cache.tests/build.properties
deleted file mode 100644
index 0da5546..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-source.tests.jar = src/
-output.tests.jar = bin/
-bin.includes = META-INF/,\
- tests.jar,\
- test.xml
-src.includes = META-INF/,\
- build.properties,\
- src/,\
- test.xml
diff --git a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheEntryTest.java b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheEntryTest.java
deleted file mode 100644
index f98308c..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheEntryTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.cache.internal;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Tests for the CacheEntry class.
- */
-public class CacheEntryTest extends TestCase
-{
- /**
- * Create a tests suite from this test class.
- *
- * @return A test suite containing this test class.
- */
- public static Test suite()
- {
- return new TestSuite(CacheEntryTest.class);
- }
-
- /**
- * Test that the entry is not considered expired when -1 is specified.
- */
- public void testNotExpiredWhenMinusOne()
- {
- CacheEntry cacheEntry = new CacheEntry(null, null, 0, -1);
- assertFalse("The cache entry is expired when -1 is specified.", cacheEntry.hasExpired());
- }
-
- /**
- * Test that the entry is not considered expired when the set expiration
- * time is greater than the current system time.
- */
- public void testNotExpiredWhenGreaterThanSystemTime()
- {
- CacheEntry cacheEntry = new CacheEntry(null, null, 0, System.currentTimeMillis() + 60000);
- assertFalse("The cache entry is expired when greater than the currnet system time.", cacheEntry.hasExpired());
- }
-
- /**
- * Test that the entry is considered expired when the set expiration
- * time is less than the current system time.
- */
- public void testExpiredWhenLessThanSystemTime()
- {
- CacheEntry cacheEntry = new CacheEntry(null, null, 0, System.currentTimeMillis() - 60000);
- assertTrue("The cache entry is not expired when less than the currnet system time.", cacheEntry.hasExpired());
- }
-}
diff --git a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheTest.java b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheTest.java
deleted file mode 100644
index e789bf9..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheTest.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.cache.internal;
-
-import java.io.File;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Tests for the Cache class.
- */
-public class CacheTest extends TestCase
-{
- private Cache cache;
-
- /**
- * Create a tests suite from this test class.
- *
- * @return A test suite containing this test class.
- */
- public static Test suite()
- {
- return new TestSuite(CacheTest.class);
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- cache = Cache.getInstance();
- }
-
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
-
- /**
- * Test trying to cache a resource that doesn't exist.
- */
- public void testGetNonExistantResource()
- {
- String resource = "http://www.eclipse.org/webtools/nonexistantfile";
- String result = cache.getResource(resource);
- cache.clear();
- assertNull("The result returned for resource " + resource + " is not null.", result);
- }
-
- /**
- * Test trying to get a resource specified by null.
- */
- public void testGetNullResource()
- {
- String resource = null;
- String result = cache.getResource(resource);
- cache.clear();
- assertNull("The result returned for resource " + resource + " is not null.", result);
- }
-
- /**
- * Test trying to cache a resource that does exist.
- */
- public void testGetResourceThatExists()
- {
- String resource = "http://www.eclipse.org/webtools";
- String result = cache.getResource(resource);
- cache.clear();
- assertNotNull("The result returned for resource " + resource + " was null.", result);
- assertTrue("The result and resource are the same.", !resource.equals(result));
- }
-
- /**
- * Test to ensure the result that is returned starts with file:///
- */
- public void testResultStartsWithFile()
- {
- String resource = "http://www.eclipse.org/webtools";
- String result = cache.getResource(resource);
- cache.clear();
- assertTrue("The result does not start with file:///.", result.startsWith("file:///"));
- }
-
- /**
- * Test to ensure deleting a cache entry deletes it from the cache and
- * from the file system.
- */
- public void testDeleteCacheEntry()
- {
- String resource = "http://www.eclipse.org/webtools";
- String result = cache.getResource(resource);
- assertNotNull("The local cache file is null.", result);
- // Remove file:/// from the result.
- result = result.substring(8);
- assertTrue("The cache file " + result + " does not exist.", new File(result).exists());
- cache.deleteEntry(resource);
- assertFalse("The cache file was not deleted.", new File(result).exists());
- assertTrue("The cache still contains the deleted entry.", cache.getCachedURIs().length == 0);
- cache.clear();
- }
-
- /**
- * Test to ensure deleting a null cache entry simply returns.
- */
- public void testDeleteNullCacheEntry()
- {
- String resource = "http://www.eclipse.org/webtools";
- cache.getResource(resource);
- cache.deleteEntry(null);
- assertFalse("The cache no longer contains the entry after deleting null.", cache.getCachedURIs().length == 0);
- cache.clear();
- }
-
- /**
- * Test to ensure clearing the cache with a single entry deletes the entry
- * from the cache and deletes the file from the file system.
- */
- public void testClearCacheWithSingleEntry()
- {
- String resource1 = "http://www.eclipse.org/webtools";
- String result1 = cache.getResource(resource1);
- assertNotNull("The local cache file is null for resource1.", result1);
- // Remove file:/// from the result.
- result1 = result1.substring(8);
- assertTrue("The cache file " + result1 + " does not exist.", new File(result1).exists());
- cache.clear();
- assertFalse("The cache file for resource1 was not deleted.", new File(result1).exists());
- assertTrue("The cache still contains the deleted entries.", cache.getCachedURIs().length == 0);
- }
-
- /**
- * Test to ensure clearing the cache with multiple entries deletes the entries
- * from the cache and deletes the files from the file system.
- */
- public void testClearCacheWithMultipleEntries()
- {
- String resource1 = "http://www.eclipse.org/webtools";
- String resource2 = "http://www.eclipse.org";
- String result1 = cache.getResource(resource1);
- String result2 = cache.getResource(resource2);
- assertNotNull("The local cache file is null for resource1.", result1);
- assertNotNull("The local cache file is null for resource2.", result2);
- // Remove file:/// from the result.
- result1 = result1.substring(8);
- result2 = result2.substring(8);
- assertTrue("The cache file " + result1 + " does not exist.", new File(result1).exists());
- assertTrue("The cache file " + result2 + " does not exist.", new File(result2).exists());
- cache.clear();
- assertFalse("The cache file for resource1 was not deleted.", new File(result1).exists());
- assertFalse("The cache file for resource2 was not deleted.", new File(result2).exists());
- assertTrue("The cache still contains the deleted entries.", cache.getCachedURIs().length == 0);
- }
-
- /**
- * Test to ensure deleting a null cache entry simply returns.
- */
- public void testGetInstance()
- {
- assertNotNull("The cache object is null.", cache);
- }
-
- /**
- * Test to ensure getCacheEntries returns all of the cache entries and not entries that
- * haven't been cached.
- */
- public void testGetCacheEntries()
- {
- String resource1 = "http://www.eclipse.org/webtools";
- String resource2 = "http://www.eclipse.org";
- String resource3 = "http://www.eclipse.org/webtools/nonexistantfile";
- cache.getResource(resource1);
- cache.getResource(resource2);
- cache.getResource(resource3);
- String[] uris = cache.getCachedURIs();
- assertTrue("There are not 2 entries in the cache.", uris.length == 2);
-
- for(int i = 0; i < uris.length -1; i++)
- {
- String uri = uris[i];
- if(!(uri.equals(resource1) || uri.equals(resource2) || uri.equals(resource3)))
- {
- fail("The URI " + uri + " is not equal to any of the resources put in the cache.");
- }
- }
- cache.clear();
-
- }
-
-
-
-
-
-}
diff --git a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheURIResolverExtensionTest.java b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheURIResolverExtensionTest.java
deleted file mode 100644
index abd155e..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheURIResolverExtensionTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.cache.internal;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Tests for the CacheURIResolverExtension class.
- */
-public class CacheURIResolverExtensionTest extends TestCase
-{
- private CacheURIResolverExtension cacheResolver;
-
- /**
- * Create a tests suite from this test class.
- *
- * @return A test suite containing this test class.
- */
- public static Test suite()
- {
- return new TestSuite(CacheURIResolverExtensionTest.class);
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
- cacheResolver = new CacheURIResolverExtension();
- }
-
- /**
- * Test that the result returned when a null systemId is given is null.
- */
- public void testResolveNullSystemId()
- {
- String result = cacheResolver.resolve(null,"http://www.eclipse.org/webtools", null, null);
- assertNull("The result is not null.", result);
- }
-
- /**
- * Test that the result returned when a null systemId and a null baselocation
- * are given is null.
- */
- public void testResolveNullSystemIdAndBaselocation()
- {
- String result = cacheResolver.resolve(null, null, null, null);
- assertNull("The result is not null.", result);
- }
-
- /**
- * Test that the result is sucessfully cached when an absolute systemId
- * is given.
- */
- public void testAbsoluteSystemId()
- {
- String result = cacheResolver.resolve(null,"http://www.eclipse.org/webtools", null, "http://www.eclipse.org");
- assertNotNull("The result is null.", result);
- }
-
- /**
- * Test that the result is sucessfully cached when an absolute systemId
- * is given and a null base location is given
- */
- public void testAbsoluteSystemIdNullBaselocation()
- {
- String result = cacheResolver.resolve(null, null, null, "http://www.eclipse.org");
- assertNotNull("The result is null.", result);
- }
-
- /**
- * Test that the result is sucessfully cached when a relative systemId
- * is given.
- */
- public void testRelativeSystemId()
- {
- String result = cacheResolver.resolve(null,"http://www.eclipse.org/webtools/community/somefile.xml", null, "community.html");
- assertNotNull("The result is null.", result);
- }
-
- /**
- * Test that the result is unsucessfully cached when a relative systemId
- * is given and a null base location is given.
- */
- public void testRelativeSystemIdWillNullBaselocation()
- {
- String result = cacheResolver.resolve(null, null, null, "community.html");
- assertNull("The result is not null.", result);
- }
-
- /**
- * Test that null is returned when the cache is disabled.
- */
- public void testReturnsNullWhenDisabled()
- {
- CachePlugin.getDefault().setCacheEnabled(false);
- String result = cacheResolver.resolve(null, "http://www.eclipse.org/webtools/", null, "http://www.eclipse.org/webtools/");
- assertNull("The result is not null.", result);
- CachePlugin.getDefault().setCacheEnabled(true);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/AllCacheTests.java b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/AllCacheTests.java
deleted file mode 100644
index 76f6b10..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/AllCacheTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.cache.tests.internal;
-import junit.framework.Test;
-
-import org.eclipse.wst.internet.cache.internal.CacheEntryTest;
-import org.eclipse.wst.internet.cache.internal.CacheTest;
-import org.eclipse.wst.internet.cache.internal.CacheURIResolverExtensionTest;
-/**
- * The root test suite that contains all other Cache test suites.
- */
-public class AllCacheTests extends junit.framework.TestSuite
-{
- /**
- * Create this test suite.
- *
- * @return This test suite.
- */
- public static Test suite()
- {
- return new AllCacheTests();
- }
-
- /**
- * Constructor
- */
- public AllCacheTests()
- {
- super("AllCacheTests");
- addTest(CacheTest.suite());
- addTest(CacheEntryTest.suite());
- addTest(CacheURIResolverExtensionTest.suite());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/CacheTestsPlugin.java b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/CacheTestsPlugin.java
deleted file mode 100644
index 6404a3d..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/CacheTestsPlugin.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.cache.tests.internal;
-
-import org.eclipse.ui.plugin.*;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.osgi.framework.BundleContext;
-import java.util.*;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class CacheTestsPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static CacheTestsPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public CacheTestsPlugin() {
- super();
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- resourceBundle = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static CacheTestsPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- ResourceBundle bundle = CacheTestsPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- try {
- if (resourceBundle == null)
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.internal.cache.tests.CacheTestsPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.wst.internal.cache.tests", path);
- }
-}
diff --git a/tests/org.eclipse.wst.internet.cache.tests/test.xml b/tests/org.eclipse.wst.internet.cache.tests/test.xml
deleted file mode 100644
index 1b5532f..0000000
--- a/tests/org.eclipse.wst.internet.cache.tests/test.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
-
- <!-- Configurable Properties -->
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.wst.internet.cache.tests"/>
-
- <!-- End Configurable Properties -->
-
- <!-- The property ${eclipse-home} should be passed into this script -->
- <!-- Set a meaningful default value for when it is not. -->
- <property name="eclipse-home" value="${basedir}\..\.."/>
- <property name="bvtworkspace" value="${basedir}"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
- <property name="workspace-folder" value="${bvtworkspace}/${plugin-name}"/>
-
- <!-- This target holds all initialization code that needs to be done for -->
- <!-- all tests that are to be run. Initialization for individual tests -->
- <!-- should be done within the body of the suite target. -->
- <target name="init">
- <tstamp/>
- <delete>
- <fileset dir="${eclipse-home}" includes="org.eclipse.wst.internet.cache.tests.*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
-
- <!-- Start with clean data workspace -->
- <delete dir="${workspace-folder}" quiet="true"/>
-
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${workspace-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.wst.internet.cache.tests.internal.AllCacheTests"/>
- </ant>
-
- </target>
-
- <!-- This target holds code to cleanup the testing environment after -->
- <!-- after all of the tests have been run. You can use this target to -->
- <!-- delete temporary files that have been created. -->
- <target name="cleanup">
- <delete dir="${workspace-folder}" quiet="true"/>
- </target>
-
- <!-- This target runs the test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="run" depends="init,suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.eclipse.wst.internet.cache.tests*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>