Initial commit of internet cache tests plugin.
diff --git a/tests/org.eclipse.wst.internet.cache.tests/.classpath b/tests/org.eclipse.wst.internet.cache.tests/.classpath
new file mode 100644
index 0000000..065ac06
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/.classpath
@@ -0,0 +1,7 @@
+<?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
new file mode 100644
index 0000000..ba077a4
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/.cvsignore
@@ -0,0 +1 @@
+bin
diff --git a/tests/org.eclipse.wst.internet.cache.tests/.project b/tests/org.eclipse.wst.internet.cache.tests/.project
new file mode 100644
index 0000000..fb4b067
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/.project
@@ -0,0 +1,28 @@
+<?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
new file mode 100644
index 0000000..523bec5
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Cache Tests Plug-in
+Bundle-SymbolicName: org.eclipse.wst.internal.cache.tests
+Bundle-Version: 1.0.0
+Bundle-ClassPath: tests.jar
+Bundle-Activator: org.eclipse.wst.internal.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
new file mode 100644
index 0000000..7dc4531
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/build.properties
@@ -0,0 +1,4 @@
+source.tests.jar = src/
+output.tests.jar = bin/
+bin.includes = META-INF/,\
+               tests.jar
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
new file mode 100644
index 0000000..f98308c
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheEntryTest.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 0000000..e789bf9
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheTest.java
@@ -0,0 +1,200 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 0000000..abd155e
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/internal/CacheURIResolverExtensionTest.java
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * 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
new file mode 100644
index 0000000..cf7bd76
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/AllCacheTests.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * 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.internal.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
new file mode 100644
index 0000000..29c70e6
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/src/org/eclipse/wst/internet/cache/tests/internal/CacheTestsPlugin.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.internal.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
new file mode 100644
index 0000000..1b5532f
--- /dev/null
+++ b/tests/org.eclipse.wst.internet.cache.tests/test.xml
@@ -0,0 +1,59 @@
+<?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>