This commit was manufactured by cvs2svn to create tag 'v20041224'.
diff --git a/tests/org.eclipse.jst.server.generic.tests/.classpath b/tests/org.eclipse.jst.server.generic.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.jst.server.generic.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.jst.server.generic.tests/.cvsignore b/tests/org.eclipse.jst.server.generic.tests/.cvsignore
deleted file mode 100644
index 60463af..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-build.xml
diff --git a/tests/org.eclipse.jst.server.generic.tests/.project b/tests/org.eclipse.jst.server.generic.tests/.project
deleted file mode 100644
index 5ceacf5..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.generic.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.jst.server.generic.tests/build.properties b/tests/org.eclipse.jst.server.generic.tests/build.properties
deleted file mode 100644
index 5b5f309..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/build.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-source.genericServerTests.jar = src/
-output.genericServerTests.jar = bin/
-bin.includes = plugin.xml,\
- test.xml,\
- genericServerTests.jar
-src.includes = test.xml,\
- plugin.xml
-
diff --git a/tests/org.eclipse.jst.server.generic.tests/plugin.xml b/tests/org.eclipse.jst.server.generic.tests/plugin.xml
deleted file mode 100644
index c91f1c6..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/plugin.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.generic.tests"
- name="Generic Server Tests Plug-in"
- version="1.0.0"
- provider-name="Eteration.com"
- class="org.eclipse.jst.server.generic.tests.TestsPlugin">
-
- <runtime>
- <library name="genericServerTests.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.jst.server.generic.core"/>
- <import plugin="org.eclipse.jst.server.generic.ui"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.jdt.core"/>
- <import plugin="org.eclipse.jdt.launching"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.debug.core"/>
- <import plugin="org.eclipse.jst.server.core"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/AllGenericServerTests.java b/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/AllGenericServerTests.java
deleted file mode 100644
index 6330231..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/AllGenericServerTests.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllGenericServerTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "Test for org.eclipse.jst.server.generic.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ServerDefinitionTypeTest.class);
- suite.addTestSuite(GenericServerClasspathRuntimeHandlerTest.class);
- suite.addTestSuite(PluginIntegrityTest.class);
- suite.addTestSuite(ServerCreationTest.class);
- //$JUnit-END$
- return suite;
- }
-}
diff --git a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/GenericServerClasspathRuntimeHandlerTest.java b/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/GenericServerClasspathRuntimeHandlerTest.java
deleted file mode 100644
index c3d94f7..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/GenericServerClasspathRuntimeHandlerTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Created on Dec 11, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-package org.eclipse.jst.server.generic.tests;
-
-import java.util.HashMap;
-
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jst.server.generic.internal.core.GenericServerRuntime;
-import org.eclipse.jst.server.generic.internal.core.GenericServerRuntimeTargetHandler;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-
-import junit.framework.TestCase;
-
-/**
- *
- *
- * @author Gorkem Ercan
- */
-public class GenericServerClasspathRuntimeHandlerTest extends TestCase {
-
- private static final String CLASSPATH_PREFIX = "/dev/java/appservers/JOnAS-4.1.4";
- private static final String SERVER_DEF_NAME = "JonAS 4.1.4";
- private IRuntime fRuntime;
- /*
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- IRuntimeType type =ServerCore.findRuntimeType("org.eclipse.jst.server.generic.runtime");
- IRuntimeWorkingCopy wc = type.createRuntime("testRuntime",null);
- RuntimeDelegate delegate = (RuntimeDelegate)wc.getAdapter(RuntimeDelegate.class);
- HashMap props = new HashMap();
- props.put("mappernames", "");
- props.put("classPathVariableName", "JONAS");
- props.put("serverAddress", "127.0.0.1");
- props.put("jonasBase", "D:\\dev\\java\\appservers\\JOnAS-4.1.4");
- props.put("jonasRoot", "D:\\dev\\java\\appservers\\JOnAS-4.1.4");
- props.put("classPath", CLASSPATH_PREFIX);
- props.put("protocols", "jrmp");
- props.put("port", "9000");
- delegate.setAttribute(
- GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, props);
- delegate.setAttribute(GenericServerRuntime.SERVER_DEFINITION_ID,SERVER_DEF_NAME);
- wc.save(false,null);
-
- fRuntime = wc.getOriginal();
- }
-
- /**
- * Constructor for ClasspathRuntimeHandlerTest.
- * @param name
- */
- public GenericServerClasspathRuntimeHandlerTest(String name) {
- super(name);
- }
-
- public void testGetClasspathContainerLabel() {
- GenericServerRuntimeTargetHandler handler = new GenericServerRuntimeTargetHandler();
- String name = handler.getClasspathContainerLabel(fRuntime,null);
- assertEquals(SERVER_DEF_NAME,name);
- }
-
- public void testResolveClasspathContainer() {
- GenericServerRuntimeTargetHandler handler = new GenericServerRuntimeTargetHandler();
- IClasspathEntry[] entries = handler.resolveClasspathContainer(fRuntime,null);
- assertNotNull("Failed to resolve classpath entries",entries);
- for (int i = 0; i < entries.length; i++) {
- assertTrue("the resolved classpath entry does not start with classpath prefix",(new org.eclipse.core.runtime.Path(CLASSPATH_PREFIX)).isPrefixOf(entries[i].getPath()));
- }
- }
-
-}
diff --git a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/PluginIntegrityTest.java b/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/PluginIntegrityTest.java
deleted file mode 100644
index aaf8dea..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/PluginIntegrityTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.tests;
-
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.ui.GenericUiPlugin;
-
-
-import junit.framework.TestCase;
-
-/**
- * @author naci
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
-public class PluginIntegrityTest extends TestCase {
-
- /*
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /*
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /**
- * Constructor for PluginIntegrityTest.
- * @param name
- */
- public PluginIntegrityTest(String name) {
- super(name);
- }
-
- public void testGenericUiPluginExists(){
- assertNotNull(GenericUiPlugin.getDefault());
- }
- public void testCorePluginExists(){
- assertNotNull(CorePlugin.getDefault());
- }
-
-}
diff --git a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/ServerCreationTest.java b/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/ServerCreationTest.java
deleted file mode 100644
index 810c78e..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/ServerCreationTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.tests;
-
-import java.util.HashMap;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.server.generic.internal.core.GenericServer;
-import org.eclipse.jst.server.generic.internal.core.GenericServerRuntime;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.IServerType;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.RuntimeType;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-
-public class ServerCreationTest extends TestCase {
-
- RuntimeType j2eeRuntimeType = null;
- private final static String ID = "org.eclipse.jst.server.generic";
-
- /*
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- IRuntimeType[] listAll = ServerCore.getRuntimeTypes();
- if (listAll != null) {
- for (int i = 0; i < listAll.length; i++) {
- IRuntimeType runtimeType = listAll[i];
-
- if ("J2EE Runtime Library".equals(runtimeType.getName()))
- j2eeRuntimeType = (RuntimeType) runtimeType;
- }
- }
-
- }
-
- /*
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /**
- * Constructor for PluginIntegrityTest.
- *
- * @param name
- */
- public ServerCreationTest(String name) {
- super(name);
- }
-
- public void testGetTypes() {
- assertNotNull(j2eeRuntimeType);
- }
-
- public void testCreateServer() throws Exception {
-
- // Finds the generic server type
- IServerType[] sTypes = ServerCore.getServerTypes();
- IServerType serverType = null;
- for (int i = 0; i < sTypes.length; i++) {
- IServerType sType = sTypes[i];
- if (ID.equals(sType.getId()))
- serverType = sType;
- }
- assertNotNull("Could not find org.eclipse.jst.server.generic server type",serverType);
-
- //Finds the generic server runtime type
- IRuntimeType runtimeType = serverType.getRuntimeType();
- assertNotNull("Could not find runtime type for the generic server type",runtimeType);
-
-
- //Create a new server instance from the type
- IServerWorkingCopy server = serverType.createServer(ID+".Jonas.Server", null,
- (IRuntime) null, null);
- assertNotNull("Could not create server",server);
-
-
- //Create a new runtime instance from the type
- IRuntime runtime = runtimeType.createRuntime(ID+".Jonas.Runtime",null);
-
- assertNotNull("Could not create runtime",runtime);
-
-
- //Set the runtime for the server
- server.setRuntime(runtime);
-
- //Save the server
- server.save(false,null);
-
- // Set properties for the runtime
- IRuntimeWorkingCopy runtimeWorkingCopy = runtime.createWorkingCopy();
- assertNotNull("Could not create runtime working copy",runtimeWorkingCopy);
-
- // Set the JONAS runtime as the default runtime
- ServerUtil.setRuntimeDefaultName(runtimeWorkingCopy);
- assertNotNull("Runtime working copy has no name",runtimeWorkingCopy.getName());
-
- // Set properties for the JONAS runtime
- RuntimeDelegate runtimeDelegate = (RuntimeDelegate)runtimeWorkingCopy.getAdapter(RuntimeDelegate.class);
- assertNotNull("Could not obtain runtime delegate",runtimeDelegate);
-
- HashMap props = new HashMap();
- props.put("mappernames", "");
- props.put("classPathVariableName", "JONAS");
- props.put("serverAddress", "127.0.0.1");
- props.put("jonasBase", "C:\\nmd\\dev\\java\\appservers\\JOnAS-4.1.4");
- props.put("jonasRoot", "C:\\nmd\\dev\\java\\appservers\\JOnAS-4.1.4");
- props.put("classPath", "C:\\nmd\\dev\\java\\appservers\\JOnAS-4.1.4");
- props.put("protocols", "C:\\nmd\\dev\\java\\appservers\\JOnAS-4.1.4");
- props.put("port", "9000");
- runtimeDelegate.setAttribute(
- GenericServerRuntime.SERVER_INSTANCE_PROPERTIES, props);
-
- //Save the runtime working copy
- runtimeWorkingCopy.save(false,null);
-
- }
-
-
-
-
- public void testGetWebTypes() {
-
- IRuntimeType listWeb[] = ServerUtil.getRuntimeTypes("j2ee.web", null);
- assertNotNull(listWeb);
-
- boolean found = false;
- for (int i = 0; i < listWeb.length; i++) {
- IRuntimeType runtimeType = listWeb[i];
- if ("J2EE Runtime Library".equals(runtimeType.getName()))
- found = true;
- }
- assertTrue(found);
- }
-
-
-
- private ServerDelegate getDelegate(
- IServerWorkingCopy serverWC, IServerType serverType) {
-
- GenericServer server = new GenericServer();
- server.initialize((ServerWorkingCopy)serverWC);
- return server;
- }
-
-}
diff --git a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/ServerDefinitionTypeTest.java b/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/ServerDefinitionTypeTest.java
deleted file mode 100644
index f92010b..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/ServerDefinitionTypeTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.tests;
-
-import junit.framework.TestCase;
-
-import org.eclipse.jst.server.generic.core.CorePlugin;
-import org.eclipse.jst.server.generic.internal.core.ServerTypeDefinitionManager;
-import org.eclipse.jst.server.generic.servertype.definition.ServerRuntime;
-
-/**
- * @author naci
- *
- * TODO To change the template for this generated type comment go to Window -
- * Preferences - Java - Code Style - Code Templates
- */
-public class ServerDefinitionTypeTest extends TestCase {
-
- /*
- * @see TestCase#setUp()
- */
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- /*
- * @see TestCase#tearDown()
- */
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- /**
- * Constructor for PluginIntegrityTest.
- *
- * @param name
- */
- public ServerDefinitionTypeTest(String name) {
- super(name);
- }
-
- public void testGetTypes() {
- ServerTypeDefinitionManager serverTypeDefinitionManager = CorePlugin
- .getDefault().getServerTypeDefinitionManager();
- assertNotNull(serverTypeDefinitionManager);
- ServerRuntime[] types = serverTypeDefinitionManager
- .getServerTypeDefinitions();
- assertNotNull(types);
- assertEquals(3, types.length);
- }
-
- public void testResolve() {
- ServerTypeDefinitionManager serverTypeDefinitionManager = CorePlugin
- .getDefault().getServerTypeDefinitionManager();
- assertNotNull(serverTypeDefinitionManager);
- ServerRuntime[] types = serverTypeDefinitionManager
- .getServerTypeDefinitions();
- assertNotNull(types);
- assertTrue(types.length > 0);
- for (int i = 0; i < types.length; i++) {
- ServerRuntime definition = types[i];
- String wd = definition.getStart().getWorkingDirectory();
- String resolved = definition.getResolver().resolveProperties(wd);
- assertFalse(resolved.indexOf("${") >= 0);
- }
- }
-}
diff --git a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/TestProject.java b/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/TestProject.java
deleted file mode 100644
index 5ca8ed0..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/TestProject.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.tests;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.ITypeNameRequestor;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.osgi.framework.Bundle;
-public class TestProject {
- public IProject project;
- public IJavaProject javaProject;
- private IPackageFragmentRoot sourceFolder;
- public TestProject() throws CoreException {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- project = root.getProject("Project-1");
- project.create(null);
- project.open(null);
- javaProject = JavaCore.create(project);
- IFolder binFolder = createBinFolder();
- setJavaNature();
- javaProject.setRawClasspath(new IClasspathEntry[0], null);
- createOutputFolder(binFolder);
- addSystemLibraries();
- }
- public IProject getProject() {
- return project;
- }
- public IJavaProject getJavaProject() {
- return javaProject;
- }
- public void addJar(String plugin, String jar) throws MalformedURLException,
- IOException, JavaModelException {
- Path result = findFileInPlugin(plugin, jar);
- IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
- IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1];
- System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
- newEntries[oldEntries.length] = JavaCore.newLibraryEntry(result, null,
- null);
- javaProject.setRawClasspath(newEntries, null);
- }
- public IPackageFragment createPackage(String name) throws CoreException {
- if (sourceFolder == null)
- sourceFolder = createSourceFolder();
- return sourceFolder.createPackageFragment(name, false, null);
- }
- public IType createType(IPackageFragment pack, String cuName, String source)
- throws JavaModelException {
- StringBuffer buf = new StringBuffer();
- buf.append("package " + pack.getElementName() + ";\n");
- buf.append("\n");
- buf.append(source);
- ICompilationUnit cu = pack.createCompilationUnit(cuName,
- buf.toString(), false, null);
- return cu.getTypes()[0];
- }
- public void dispose() throws CoreException {
- waitForIndexer();
- project.delete(true, true, null);
- }
- private IFolder createBinFolder() throws CoreException {
- IFolder binFolder = project.getFolder("bin");
- binFolder.create(false, true, null);
- return binFolder;
- }
-
- public IFolder createWebModule(String moduleName, String contents) throws CoreException {
- IFolder moduleFolder = project.getFolder(moduleName);
- moduleFolder.create(false, true, null);
-
- IFolder folder = project.getFolder(moduleName + "/WEB-INF");
- folder.create(false, true, null);
- folder = project.getFolder(moduleName + "/WEB-INF/classes");
- folder.create(false, true, null);
- folder = project.getFolder(moduleName + "/WEB-INF/lib");
- folder.create(false, true, null);
-
- ByteArrayInputStream stream = new ByteArrayInputStream(contents.getBytes());
- IFile file = project.getFile(moduleName + "/WEB-INF/web.xml");
- file.create(stream, true, null);
-
- return moduleFolder;
- }
-
- private void setJavaNature() throws CoreException {
- IProjectDescription description = project.getDescription();
- description.setNatureIds(new String[]{JavaCore.NATURE_ID});
- project.setDescription(description, null);
- }
- private void createOutputFolder(IFolder binFolder)
- throws JavaModelException {
- IPath outputLocation = binFolder.getFullPath();
- javaProject.setOutputLocation(outputLocation, null);
- }
- public IPackageFragmentRoot createSourceFolder() throws CoreException {
- IFolder folder = project.getFolder("src");
- folder.create(false, true, null);
- IPackageFragmentRoot root = javaProject.getPackageFragmentRoot(folder);
- IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
- IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1];
- System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
- newEntries[oldEntries.length] = JavaCore.newSourceEntry(root.getPath());
- javaProject.setRawClasspath(newEntries, null);
- return root;
- }
- private void addSystemLibraries() throws JavaModelException {
- IClasspathEntry[] oldEntries = javaProject.getRawClasspath();
- IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1];
- System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
- newEntries[oldEntries.length] = JavaRuntime
- .getDefaultJREContainerEntry();
- javaProject.setRawClasspath(newEntries, null);
- }
- private Path findFileInPlugin(String plugin, String file)
- throws MalformedURLException, IOException {
- Bundle bundle = Platform.getBundle(plugin);
- URL pluginURL = bundle.getEntry("/");
- URL jarURL = new URL(pluginURL, file);
- URL localJarURL = Platform.asLocalURL(jarURL);
- return new Path(localJarURL.getPath());
- }
- private void waitForIndexer() throws JavaModelException {
- new SearchEngine().searchAllTypeNames(ResourcesPlugin.getWorkspace(),
- null, null, IJavaSearchConstants.EXACT_MATCH,
- IJavaSearchConstants.CASE_SENSITIVE,
- IJavaSearchConstants.CLASS, SearchEngine
- .createJavaSearchScope(new IJavaElement[0]),
- new ITypeNameRequestor() {
- public void acceptClass(char[] packageName,
- char[] simpleTypeName, char[][] enclosingTypeNames,
- String path) {
- }
- public void acceptInterface(char[] packageName,
- char[] simpleTypeName, char[][] enclosingTypeNames,
- String path) {
- }
- }, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
- }
- /**
- * @return Returns the sourceFolder.
- */
- public IPackageFragmentRoot getSourceFolder() {
- return sourceFolder;
- }
- /**
- * @param sourceFolder The sourceFolder to set.
- */
- public void setSourceFolder(IPackageFragmentRoot sourceFolder) {
- this.sourceFolder = sourceFolder;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/TestsPlugin.java b/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/TestsPlugin.java
deleted file mode 100644
index 95fff08..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/src/org/eclipse/jst/server/generic/tests/TestsPlugin.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 Eteration Bilisim A.S.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * Naci M. Dai - initial API and implementation
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Eteration Bilisim A.S. For more
- * information on eteration, please see
- * <http://www.eteration.com/>.
- ***************************************************************************/
-
-package org.eclipse.jst.server.generic.tests;
-
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.util.*;
-
-
-public class TestsPlugin extends AbstractUIPlugin {
- //The shared instance.
- private static TestsPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public TestsPlugin() {
- 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 TestsPlugin 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 = TestsPlugin.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.jst.server.generic.tests.TestsPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
diff --git a/tests/org.eclipse.jst.server.generic.tests/test.xml b/tests/org.eclipse.jst.server.generic.tests/test.xml
deleted file mode 100644
index 900f5bb..0000000
--- a/tests/org.eclipse.jst.server.generic.tests/test.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- 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}\..\.."/> -->
- <echo message="basedir ${basedir}" />
- <echo message="eclipse place ${eclipse-home}" />
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.jst.server.generic.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
-
- <!-- 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*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="jst-folder" value="${eclipse-home}/jst_folder"/>
- <delete dir="${jst-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${jst-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.jst.server.generic.tests.AllGenericServerTests" />
- <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
- </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">
- </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*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.tests.performance/.cvsignore b/tests/org.eclipse.jst.server.tomcat.tests.performance/.cvsignore
deleted file mode 100644
index 5041fbe..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-performance.jar
-org.eclipse.jst.server.tomcat.tests.performance_1.0.0.jar
-build.xml
diff --git a/tests/org.eclipse.wst.server.core.tests/.classpath b/tests/org.eclipse.wst.server.core.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.wst.server.core.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.server.core.tests/.cvsignore b/tests/org.eclipse.wst.server.core.tests/.cvsignore
deleted file mode 100644
index 8470d8e..0000000
--- a/tests/org.eclipse.wst.server.core.tests/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-bin
-build.xml
-temp.folder
-servertests.jar
diff --git a/tests/org.eclipse.wst.server.core.tests/.project b/tests/org.eclipse.wst.server.core.tests/.project
deleted file mode 100644
index e0d60d9..0000000
--- a/tests/org.eclipse.wst.server.core.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.server.core.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.server.core.tests/build.properties b/tests/org.eclipse.wst.server.core.tests/build.properties
deleted file mode 100644
index 1b5aebd..0000000
--- a/tests/org.eclipse.wst.server.core.tests/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.servertests.jar = src/
-output.servertests.jar = bin/
-bin.includes = plugin.xml,\
- servertests.jar,\
- test.xml
-src.includes = test.xml,\
- plugin.xml
diff --git a/tests/org.eclipse.wst.server.core.tests/plugin.xml b/tests/org.eclipse.wst.server.core.tests/plugin.xml
deleted file mode 100644
index 8460ae2..0000000
--- a/tests/org.eclipse.wst.server.core.tests/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.server.core.tests"
- name="org.eclipse.wst.server.core.tests"
- version="1.0.0"
- provider-name="Eteration.com"
- class="org.eclipse.wst.server.core.tests.TestsPlugin">
-
- <runtime>
- <library name="servertests.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.wst.server.core"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/AllTests.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/AllTests.java
deleted file mode 100644
index 3389d06..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/AllTests.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2004 Eteration Bilisim A.S.
-* All rights reserved. ? This program and the accompanying materials
-* are made available under the terms of the Common Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/cpl-v10.html
-*
-* Contributors:
-* Deniz Secilir - initial API and implementation
-*
-* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
-* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-* SUCH DAMAGE.
-* ====================================================================
-*
-* This software consists of voluntary contributions made by many
-* individuals on behalf of the Eteration Bilisim A.S. For more
-* information on eteration, please see
-* <http://www.eteration.com/>.
-***************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.tests.extension.*;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.wtp.wst.server.core.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- suite.addTestSuite(StartupExtensionTestCase.class);
- suite.addTestSuite(ModuleFactoriesTestCase.class);
- suite.addTestSuite(RuntimeTypesTestCase.class);
- suite.addTestSuite(RuntimeTargetHandlersTestCase.class);
- suite.addTestSuite(RuntimeLocatorsTestCase.class);
- suite.addTestSuite(ServerTypesTestCase.class);
- suite.addTestSuite(ServerTasksTestCase.class);
- suite.addTestSuite(ServerLocatorsTestCase.class);
- suite.addTestSuite(ModuleObjectAdaptersTestCase.class);
- suite.addTestSuite(LaunchableAdaptersTestCase.class);
- suite.addTestSuite(ClientsTestCase.class);
-
- suite.addTestSuite(ServerCoreTestCase.class);
- suite.addTestSuite(ServerUtilTestCase.class);
- suite.addTest(new OrderedTestSuite(ProjectPropertiesTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerPreferencesTestCase.class));
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ExistenceTest.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ExistenceTest.java
deleted file mode 100644
index 5272225..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ExistenceTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2004 Eteration Bilisim A.S.
-* All rights reserved. ? This program and the accompanying materials
-* are made available under the terms of the Common Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/cpl-v10.html
-*
-* Contributors:
-* Deniz Secilir - initial API and implementation
-*
-* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
-* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-* SUCH DAMAGE.
-* ====================================================================
-*
-* This software consists of voluntary contributions made by many
-* individuals on behalf of the Eteration Bilisim A.S. For more
-* information on eteration, please see
-* <http://www.eteration.com/>.
-***************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(ServerPlugin.getInstance());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/OrderedTestSuite.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/OrderedTestSuite.java
deleted file mode 100644
index 3947ebe..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Vector;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-class OrderedTestSuite extends TestSuite{
- public OrderedTestSuite(Class theClass, String name) {
- this(theClass);
- setName(name);
- }
-
- public OrderedTestSuite(final Class theClass) {
- super();
- setName(theClass.getName());
- try {
- getTestConstructor(theClass); // Avoid generating multiple error messages
- } catch (NoSuchMethodException e) {
- addTest(warning("Class " + theClass.getName()
- + " has no public constructor TestCase(String name) or TestCase()"));
- return;
- }
- if (!Modifier.isPublic(theClass.getModifiers())) {
- addTest(warning("Class " + theClass.getName() + " is not public"));
- return;
- }
- Class superClass = theClass;
- Vector names = new Vector();
- while (Test.class.isAssignableFrom(superClass)) {
- Method[] methods = superClass.getDeclaredMethods();
- int size = methods.length;
- for (int i = 0; i < size - 1; i++) {
- for (int j = i + 1; j < size; j++) {
- if (methods[i].getName().compareTo(methods[j].getName()) > 0) {
- Method m = methods[i];
- methods[i] = methods[j];
- methods[j] = m;
- }
- }
- }
- for (int i = 0; i < size; i++) {
- addTestMethod(methods[i], names, theClass);
- }
- superClass = superClass.getSuperclass();
- }
- if (!tests().hasMoreElements())
- addTest(warning("No tests found in " + theClass.getName()));
- }
-
- private void addTestMethod(Method m, Vector names, Class theClass) {
- String name = m.getName();
- if (names.contains(name))
- return;
- if (!isPublicTestMethod(m)) {
- if (isTestMethod(m))
- addTest(warning("Test method isn't public: " + m.getName()));
- return;
- }
- names.addElement(name);
- addTest(createTest(theClass, name));
- }
-
- private boolean isPublicTestMethod(Method m) {
- return isTestMethod(m) && Modifier.isPublic(m.getModifiers());
- }
-
- private boolean isTestMethod(Method m) {
- String name = m.getName();
- Class[] parameters = m.getParameterTypes();
- Class returnType = m.getReturnType();
- return parameters.length == 0 && name.startsWith("test") && returnType.equals(Void.TYPE);
- }
-
- private Test warning(final String message) {
- return new TestCase("warning") {
- protected void runTest() {
- fail(message);
- }
- };
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ProjectPropertiesTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ProjectPropertiesTestCase.java
deleted file mode 100644
index e2aca41..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ProjectPropertiesTestCase.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.wst.server.core.IProjectProperties;
-import org.eclipse.wst.server.core.IProjectPropertiesListener;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class ProjectPropertiesTestCase extends TestCase {
- protected static IProject project;
- protected static IProjectProperties props;
-
- protected static IProject projectEvent;
- protected static IServer serverEvent;
- protected static IRuntime runtimeEvent;
- protected static int count;
-
- protected IProjectPropertiesListener listener = new IProjectPropertiesListener() {
- public void defaultServerChanged(IProject project2, IServer server) {
- projectEvent = project2;
- serverEvent = server;
- count++;
- }
-
- public void runtimeTargetChanged(IProject project2, IRuntime runtime) {
- projectEvent = project2;
- runtimeEvent = runtime;
- count++;
- }
- };
-
- public static Test suite() {
- return new OrderedTestSuite(ProjectPropertiesTestCase.class, "ProjectPropertiesTestCase");
- }
-
- public void test00GetProperties() throws Exception {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject("test");
- if (project != null && !project.exists()) {
- project.create(null);
- project.open(null);
- }
- props = ServerCore.getProjectProperties(project);
- }
-
- public void test01AddListener() throws Exception {
- props.addProjectPropertiesListener(listener);
- }
-
- public void test02GetServer() throws Exception {
- assertNull(props.getDefaultServer());
- }
-
- public void test03GetRuntime() throws Exception {
- assertNull(props.getRuntimeTarget());
- }
-
- public void test04GetServerProject() throws Exception {
- assertFalse(props.isServerProject());
- }
-
- public void test05TestListener() throws Exception {
- assertTrue(count == 0);
- }
-
- public void test06SetServer() throws Exception {
- props.setDefaultServer(null, null);
- }
-
- public void test07TestListener() throws Exception {
- // no event since we didn't change it
- assertTrue(count == 0);
- count = 0;
- serverEvent = null;
- }
-
- public void test08SetRuntime() throws Exception {
- props.setRuntimeTarget(null, null);
- }
-
- public void test09TestListener() throws Exception {
- // no event again
- assertTrue(count == 0);
- count = 0;
- runtimeEvent = null;
- }
-
- public void test10SetServerProject() throws Exception {
- props.setServerProject(true, null);
- assertTrue(props.isServerProject());
- }
-
- public void test11UnsetServerProject() throws Exception {
- props.setServerProject(false, null);
- assertFalse(props.isServerProject());
- }
-
- public void test12TestListener() throws Exception {
- assertTrue(count == 0);
- }
-
- public void test13RemoveListener() throws Exception {
- props.removeProjectPropertiesListener(listener);
- }
-
- public void test14End() throws Exception {
- project.delete(true, true, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerCoreTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerCoreTestCase.java
deleted file mode 100644
index d81ccce..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerCoreTestCase.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class ServerCoreTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerCoreTestCase.class, "ServerCoreTestCase");
- }
-
- public void testGetRuntimesExtension() throws Exception {
- IRuntime[] runtimes = ServerCore.getRuntimes();
- if (runtimes != null) {
- int size = runtimes.length;
- for (int i = 0; i < size; i++)
- System.out.println(runtimes[i].getId() + " - " + runtimes[i].getName());
- }
- }
-
- public void testGetServersExtension() throws Exception {
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++)
- System.out.println(servers[i].getId() + " - " + servers[i].getName());
- }
- }
-
- public void testFindRuntimes0Extension() throws Exception {
- try {
- ServerCore.findRuntime(null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testFindRuntimes1Extension() throws Exception {
- assertTrue(ServerCore.findRuntime("x") == null);
- }
-
- public void testFindServers0Extension() throws Exception {
- try {
- ServerCore.findServer(null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testFindServers1Extension() throws Exception {
- assertTrue(ServerCore.findServer("x") == null);
- }
-
- public void testDefaultRuntimeExtension() throws Exception {
- ServerCore.getDefaultRuntime();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerPreferencesTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerPreferencesTestCase.java
deleted file mode 100644
index 88c994a..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerPreferencesTestCase.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.IServerPreferences;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class ServerPreferencesTestCase extends TestCase {
- protected static IServerPreferences prefs;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerPreferencesTestCase.class, "ServerPreferencesTestCase");
- }
-
- public void test00GetProperties() throws Exception {
- prefs = ServerCore.getServerPreferences();
- }
-
- public void test01GetPref() throws Exception {
- prefs.isAutoPublishing();
- }
-
- public void test02GetPref() throws Exception {
- prefs.isAutoRestarting();
- }
-
- public void test03GetPref() throws Exception {
- prefs.isCreateResourcesInWorkspace();
- }
-
- public void test04SetPref() throws Exception {
- prefs.setAutoPublishing(false);
- assertFalse(prefs.isAutoPublishing());
- }
-
- public void test05SetPref() throws Exception {
- prefs.setAutoPublishing(true);
- assertTrue(prefs.isAutoPublishing());
- }
-
- public void test06SetPref() throws Exception {
- prefs.setAutoRestarting(false);
- assertFalse(prefs.isAutoRestarting());
- }
-
- public void test07SetPref() throws Exception {
- prefs.setAutoRestarting(true);
- assertTrue(prefs.isAutoRestarting());
- }
-
- public void test08SetPref() throws Exception {
- prefs.setCreateResourcesInWorkspace(false);
- assertFalse(prefs.isCreateResourcesInWorkspace());
- }
-
- public void test09SetPref() throws Exception {
- prefs.setCreateResourcesInWorkspace(true);
- assertTrue(prefs.isCreateResourcesInWorkspace());
- }
-
- public void test10DefaultPref() throws Exception {
- prefs.setAutoPublishing(prefs.isDefaultAutoPublishing());
- assertEquals(prefs.isAutoPublishing(), prefs.isDefaultAutoPublishing());
- }
-
- public void test11DefaultPref() throws Exception {
- prefs.setAutoRestarting(prefs.isDefaultAutoRestarting());
- assertEquals(prefs.isAutoRestarting(), prefs.isDefaultAutoRestarting());
- }
-
- public void test12DefaultPref() throws Exception {
- prefs.setCreateResourcesInWorkspace(prefs.isDefaultCreateResourcesInWorkspace());
- assertEquals(prefs.isCreateResourcesInWorkspace(), prefs.isDefaultCreateResourcesInWorkspace());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerUtilTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerUtilTestCase.java
deleted file mode 100644
index b6e9cc6..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerUtilTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.server.core.ServerUtil;
-
-public class ServerUtilTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerUtilTestCase.class, "ServerUtilTestCase");
- }
-
- public void testFindServer0Extension() throws Exception {
- try {
- ServerUtil.findServer(null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testFindServer1Extension() throws Exception {
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("missingproject/test"));
- assertTrue(ServerUtil.findServer(file) == null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/TestsPlugin.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/TestsPlugin.java
deleted file mode 100644
index 863241b..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/TestsPlugin.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2004 Eteration Bilisim A.S.
-* All rights reserved. ? This program and the accompanying materials
-* are made available under the terms of the Common Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/cpl-v10.html
-*
-* Contributors:
-* Deniz Secilir - initial API and implementation
-*
-* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
-* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL ETERATION A.S. OR
-* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-* SUCH DAMAGE.
-* ====================================================================
-*
-* This software consists of voluntary contributions made by many
-* individuals on behalf of the Eteration Bilisim A.S. For more
-* information on eteration, please see
-* <http://www.eteration.com/>.
-***************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.core.runtime.Plugin;
-import java.util.*;
-
-public class TestsPlugin extends Plugin {
- //The shared instance.
- private static TestsPlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public TestsPlugin() {
- super();
- plugin = this;
- try {
- resourceBundle = ResourceBundle.getBundle("org.eclipse.wst.server.core.tests.TestsPluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- }
-
- /**
- * Returns the shared instance.
- */
- public static TestsPlugin 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 = TestsPlugin.getDefault().getResourceBundle();
- try {
- return (bundle != null) ? bundle.getString(key) : key;
- } catch (MissingResourceException e) {
- return key;
- }
- }
-
- /**
- * Returns the plugin's resource bundle,
- */
- public ResourceBundle getResourceBundle() {
- return resourceBundle;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ClientsTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ClientsTestCase.java
deleted file mode 100644
index 7ee9a6d..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ClientsTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IClient;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class ClientsTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ClientsTestCase.class, "ClientsTestCase");
- }
-
- public void testClientsExtension() throws Exception {
- IClient[] clients = ServerCore.getClients();
- if (clients != null) {
- int size = clients.length;
- for (int i = 0; i < size; i++)
- System.out.println(clients[i].getId() + " - " + clients[i].getName());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/LaunchableAdaptersTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/LaunchableAdaptersTestCase.java
deleted file mode 100644
index 8d70ed4..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/LaunchableAdaptersTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.ILaunchableAdapter;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class LaunchableAdaptersTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(LaunchableAdaptersTestCase.class, "LaunchableAdaptersTestCase");
- }
-
- public void testLaunchableAdaptersExtension() throws Exception {
- ILaunchableAdapter[] la = ServerCore.getLaunchableAdapters();
- if (la != null) {
- int size = la.length;
- for (int i = 0; i < size; i++)
- System.out.println(la[i].getId());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ModuleFactoriesTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ModuleFactoriesTestCase.java
deleted file mode 100644
index 6b10a53..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ModuleFactoriesTestCase.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.wst.server.core.ServerUtil;
-
-public class ModuleFactoriesTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ModuleFactoriesTestCase.class, "ModuleFactoriesTestCase");
- }
-
- public void testModuleFactoriesExtension() throws Exception {
- // get modules
- ServerUtil.getModules((IProject) null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ModuleObjectAdaptersTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ModuleObjectAdaptersTestCase.java
deleted file mode 100644
index a3b2689..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ModuleObjectAdaptersTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IModuleArtifactAdapter;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class ModuleObjectAdaptersTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ModuleObjectAdaptersTestCase.class, "ModuleObjectAdaptersTestCase");
- }
-
- public void testModuleObjectAdaptersExtension() throws Exception {
- IModuleArtifactAdapter[] moa = ServerCore.getModuleArtifactAdapters();
- if (moa != null) {
- int size = moa.length;
- for (int i = 0; i < size; i++)
- System.out.println(moa[i].getId() + " - " + moa[i].getObjectClassName());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeLocatorsTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeLocatorsTestCase.java
deleted file mode 100644
index 7263061..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeLocatorsTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IRuntimeLocator;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class RuntimeLocatorsTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(RuntimeLocatorsTestCase.class, "RuntimeLocatorsTestCase");
- }
-
- public void testRuntimeLocatorsExtension() throws Exception {
- IRuntimeLocator[] runtimeLocators = ServerCore.getRuntimeLocators();
- if (runtimeLocators != null) {
- int size = runtimeLocators.length;
- for (int i = 0; i < size; i++)
- System.out.println(runtimeLocators[i].getId() + " - " + runtimeLocators[i].getName());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTargetHandlersTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTargetHandlersTestCase.java
deleted file mode 100644
index f5bdeb6..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTargetHandlersTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IRuntimeTargetHandler;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class RuntimeTargetHandlersTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(RuntimeTargetHandlersTestCase.class, "RuntimeTargetHandlersTestCase");
- }
-
- public void testRuntimeTargetHandlersExtension() throws Exception {
- IRuntimeTargetHandler[] rth = ServerCore.getRuntimeTargetHandlers();
- if (rth != null) {
- int size = rth.length;
- for (int i = 0; i < size; i++)
- System.out.println(rth[i].getId());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTypesTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTypesTestCase.java
deleted file mode 100644
index eb6a098..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTypesTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class RuntimeTypesTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(RuntimeTypesTestCase.class, "RuntimeTypesTestCase");
- }
-
- public void testRuntimeTypesExtension() throws Exception {
- IRuntimeType[] runtimeTypes = ServerCore.getRuntimeTypes();
- if (runtimeTypes != null) {
- int size = runtimeTypes.length;
- for (int i = 0; i < size; i++)
- System.out.println(runtimeTypes[i].getId() + " - " + runtimeTypes[i].getName());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerLocatorsTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerLocatorsTestCase.java
deleted file mode 100644
index 14a66bd..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerLocatorsTestCase.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class ServerLocatorsTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerLocatorsTestCase.class, "ServerLocatorsTestCase");
- }
-
- public void testServerLocatorsExtension() throws Exception {
- /*IServerLocator[] serverLocators = ServerCore.getser();
- if (runtimeLocators != null) {
- int size = runtimeLocators.length;
- for (int i = 0; i < size; i++)
- System.out.println(runtimeLocators[i].getId() + " - " + runtimeLocators[i].getName());
- }*/
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerTasksTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerTasksTestCase.java
deleted file mode 100644
index efc532a..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerTasksTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IServerTask;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class ServerTasksTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerTasksTestCase.class, "ServerTasksTestCase");
- }
-
- public void testServerTasksExtension() throws Exception {
- IServerTask[] serverTasks = ServerCore.getServerTasks();
- if (serverTasks != null) {
- int size = serverTasks.length;
- for (int i = 0; i < size; i++)
- System.out.println(serverTasks[i].getId());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerTypesTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerTypesTestCase.java
deleted file mode 100644
index 37915bb..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/ServerTypesTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.IServerType;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class ServerTypesTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerTypesTestCase.class, "ServerTypesTestCase");
- }
-
- public void testServerTypesExtension() throws Exception {
- IServerType[] serverTypes = ServerCore.getServerTypes();
- if (serverTypes != null) {
- int size = serverTypes.length;
- for (int i = 0; i < size; i++)
- System.out.println(serverTypes[i].getId() + " - " + serverTypes[i].getName());
- }
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/StartupExtensionTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/StartupExtensionTestCase.java
deleted file mode 100644
index 28ea4f1..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/StartupExtensionTestCase.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class StartupExtensionTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(StartupExtensionTestCase.class, "StartupExtensionTestCase");
- }
-
- public void testStartupExtension() throws Exception {
- // startup
- ServerCore.getServers();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/test.xml b/tests/org.eclipse.wst.server.core.tests/test.xml
deleted file mode 100644
index 13a5c48..0000000
--- a/tests/org.eclipse.wst.server.core.tests/test.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="run" basedir=".">
- <!-- 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}\..\.."/> -->
- <echo message="basedir ${basedir}" />
- <echo message="eclipse place ${eclipse-home}" />
- <!-- sets the properties plugin-name, and library-file -->
- <property name="plugin-name" value="org.eclipse.wst.server.core.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
-
- <!-- 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*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the tests that need to be run. -->
- <target name="suite">
- <property name="wst-folder" value="${eclipse-home}/wst_folder"/>
- <delete dir="${wst-folder}" quiet="true"/>
- <ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${wst-folder}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.wst.server.core.tests.AllTests" />
- <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
- </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">
- </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*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-</project>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/.classpath b/tests/org.eclipse.wst.server.tests.performance/.classpath
deleted file mode 100644
index 9742e41..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="performance"/>
- <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.server.tests.performance/.cvsignore b/tests/org.eclipse.wst.server.tests.performance/.cvsignore
deleted file mode 100644
index 60463af..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-bin
-build.xml
diff --git a/tests/org.eclipse.wst.server.tests.performance/.project b/tests/org.eclipse.wst.server.tests.performance/.project
deleted file mode 100644
index 6a1412e..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.server.tests.performance</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.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.server.tests.performance/build.properties b/tests/org.eclipse.wst.server.tests.performance/build.properties
deleted file mode 100644
index 3542325..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-bin.includes = performance.jar,\
- performancesrc.zip,\
- plugin.xml,\
- test.xml
-source.performance.jar = performance/
-output.performance.jar = bin/
-src.includes = build.properties
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/AllTests.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/AllTests.java
deleted file mode 100644
index 3ba3b4a..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/AllTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.wst.server.tests.performance");
- //$JUnit-BEGIN$
- suite.addTestSuite(StartupExtensionTestCase.class);
- suite.addTestSuite(ModuleFactoriesExtensionTestCase.class);
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/ModuleFactoriesExtensionTestCase.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/ModuleFactoriesExtensionTestCase.java
deleted file mode 100644
index ea0a2da..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/ModuleFactoriesExtensionTestCase.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.test.performance.PerformanceTestCase;
-import org.eclipse.wst.server.core.ServerUtil;
-
-public class ModuleFactoriesExtensionTestCase extends PerformanceTestCase {
- public static Test suite() {
- return new TestSuite(ModuleFactoriesExtensionTestCase.class, "ModuleFactoriesExtensionTestCase");
- }
-
- public void testModuleFactoriesExtension() throws Exception {
- startMeasuring();
- ServerUtil.getModules((IProject) null);
- stopMeasuring();
- commitMeasurements();
- assertPerformance();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/PerformancePlugin.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/PerformancePlugin.java
deleted file mode 100644
index 5a5da04..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/PerformancePlugin.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance;
-
-import org.eclipse.ui.plugin.*;
-import org.osgi.framework.BundleContext;
-import java.util.*;
-/**
- * The main plugin class to be used in the desktop.
- */
-public class PerformancePlugin extends AbstractUIPlugin {
- //The shared instance.
- private static PerformancePlugin plugin;
- //Resource bundle.
- private ResourceBundle resourceBundle;
-
- /**
- * The constructor.
- */
- public PerformancePlugin() {
- 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 PerformancePlugin 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 = PerformancePlugin.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.server.tests.performance.PerformancePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/StartupExtensionTestCase.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/StartupExtensionTestCase.java
deleted file mode 100644
index 0bb274d..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/StartupExtensionTestCase.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.test.performance.PerformanceTestCase;
-import org.eclipse.wst.server.core.ServerCore;
-
-public class StartupExtensionTestCase extends PerformanceTestCase {
- public static Test suite() {
- return new TestSuite(StartupExtensionTestCase.class, "StartupExtensionTestCase");
- }
-
- public void testStartupExtension() throws Exception {
- // startup
- startMeasuring();
- ServerCore.getServers();
- stopMeasuring();
- commitMeasurements();
- assertPerformance();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractGetDelegateTestCase.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractGetDelegateTestCase.java
deleted file mode 100644
index 2e504e9..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractGetDelegateTestCase.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance.common;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-
-public abstract class AbstractGetDelegateTestCase extends ServerPerformanceTestCase {
- protected void setUp() throws Exception {
- super.setUp();
- closeIntro();
- }
-
- public void testGetDelegate() throws Exception {
- startMeasuring();
- createRuntime(getRuntimeTypeId(), getRuntimeTypeLocation());
- IServer server = createServer(getServerTypeId());
- server.getAdapter(ServerDelegate.class);
- stopMeasuring();
- commitMeasurements();
- assertPerformance();
- }
-
- protected abstract String getRuntimeTypeId();
- protected abstract String getRuntimeTypeLocation();
- protected abstract String getServerTypeId();
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractOpenEditorTestCase.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractOpenEditorTestCase.java
deleted file mode 100644
index 6f8194f..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractOpenEditorTestCase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance.common;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.internal.editor.ServerEditorInput;
-
-public abstract class AbstractOpenEditorTestCase extends ServerPerformanceTestCase {
- private final String SERVER_EDITOR_ID = "org.eclipse.wst.server.ui.editor";
-
- public void testOpenEditor() throws Exception {
- startMeasuring();
- IServer server = getFirstServer(getServerTypeId());
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = page.openEditor(new ServerEditorInput(server.getId()), SERVER_EDITOR_ID, true);
- stopMeasuring();
- commitMeasurements();
- assertPerformance();
- page.closeEditor(editor, false);
- }
-
- protected abstract String getServerTypeId();
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractServerActionsTestCase.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractServerActionsTestCase.java
deleted file mode 100644
index 33ddb82..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/AbstractServerActionsTestCase.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance.common;
-
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.internal.actions.ServerAction;
-
-public abstract class AbstractServerActionsTestCase extends ServerPerformanceTestCase {
- public void testServerActions() throws Exception {
- startMeasuring();
- IServer server = getFirstServer(getServerTypeId());
- List actions = ServerAction.getServerActions();
- for (Iterator it = actions.iterator(); it.hasNext();)
- ((ServerAction)it.next()).getDelegate().supports(server);
- stopMeasuring();
- commitMeasurements();
- assertPerformance();
- }
-
- protected abstract String getServerTypeId();
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/ServerPerformanceTestCase.java b/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/ServerPerformanceTestCase.java
deleted file mode 100644
index 61d0b83..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/performance/org/eclipse/wst/server/tests/performance/common/ServerPerformanceTestCase.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * IBM - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.tests.performance.common;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.test.performance.PerformanceTestCase;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.intro.IIntroManager;
-import org.eclipse.ui.intro.IIntroPart;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerType;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-
-public abstract class ServerPerformanceTestCase extends PerformanceTestCase {
- protected void closeIntro() {
- IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
- IIntroPart introPart = introManager.getIntro();
- if (introPart != null)
- introManager.closeIntro(introPart);
- }
-
- protected IRuntimeWorkingCopy createRuntime(String runtimeTypeId, String runtimeTypeLocation) throws CoreException {
- if (runtimeTypeId == null)
- throw new IllegalArgumentException();
- IRuntimeWorkingCopy runtimeCopy = ServerCore.findRuntimeType(runtimeTypeId).createRuntime(runtimeTypeId, null);
- runtimeCopy.setLocation(new Path(runtimeTypeLocation));
- runtimeCopy.setLocked(false);
- runtimeCopy.save(false, null);
- return runtimeCopy;
- }
-
- protected IServer createServer(String serverTypeId) throws CoreException {
- if (serverTypeId == null)
- throw new IllegalArgumentException();
- NullProgressMonitor monitor = new NullProgressMonitor();
- IServerType serverType = ServerCore.findServerType(serverTypeId);
- IServerWorkingCopy serverCopy = serverType.createServer(serverTypeId, null, monitor);
- return serverCopy.saveAll(false, monitor);
- }
-
- protected IServer getFirstServer(String serverTypeId) {
- IServer[] servers = ServerCore.getServers();
- assertTrue(servers.length > 0);
- IServer server = servers[0];
- assertNotNull(server);
- assertTrue(server.getServerType().getId().equals(serverTypeId));
- return server;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.tests.performance/plugin.xml b/tests/org.eclipse.wst.server.tests.performance/plugin.xml
deleted file mode 100644
index 83e1032..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.server.tests.performance"
- name="Server Performance Plug-in"
- version="1.0.0"
- provider-name=""
- class="org.eclipse.wst.server.tests.performance.PerformancePlugin">
-
- <runtime>
- <library name="performance.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.test.performance"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.wst.server.ui"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.wst.server.tests.performance/test.xml b/tests/org.eclipse.wst.server.tests.performance/test.xml
deleted file mode 100644
index 6381c10..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/test.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="testsuite" default="performance" basedir=".">
- <!-- 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}\..\.."/>
-
- <!-- sets the properties eclipse-home, and library-file -->
- <property name="plugin-name" value="org.eclipse.wst.server.tests.performance"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
- <property name="perf-tests-file" value="${testDir}/performance-tests.xml"/>
-
- <property name="workspace" value="${eclipse-home}/workspace_server_performance"/>
-
- <!-- 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.server.tests.performance*.xml"/>
- </delete>
- </target>
-
- <!-- This target defines the performance tests that need to be run. -->
- <target name="performance_suite">
-
- <delete dir="${workspace}" quiet="true"/>
- <ant target="core-test" antfile="${perf-tests-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${workspace}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.wst.server.tests.performance.StartupExtensionTestCase"/>
- </ant>
-
- <delete dir="${workspace}" quiet="true"/>
- <ant target="core-test" antfile="${perf-tests-file}" dir="${eclipse-home}">
- <property name="data-dir" value="${workspace}"/>
- <property name="plugin-name" value="${plugin-name}"/>
- <property name="classname" value="org.eclipse.wst.server.tests.performance.ModuleFactoriesExtensionTestCase"/>
- </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}" quiet="true"/>
- </target>
-
- <!-- This target runs the performance test suite. Any actions that need to happen -->
- <!-- after all the tests have been run should go here. -->
- <target name="performance" depends="init,performance_suite,cleanup">
- <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
- <property name="includes" value="org.eclipse.wst.server.tests.performance*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>