This commit was manufactured by cvs2svn to create tag 'v20050316'.
diff --git a/tests/org.eclipse.jst.server.core.tests/.classpath b/tests/org.eclipse.jst.server.core.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.jst.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.jst.server.core.tests/.cvsignore b/tests/org.eclipse.jst.server.core.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.jst.server.core.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jst.server.core.tests/.project b/tests/org.eclipse.jst.server.core.tests/.project
deleted file mode 100644
index f4924aa..0000000
--- a/tests/org.eclipse.jst.server.core.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.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.jst.server.core.tests/build.properties b/tests/org.eclipse.jst.server.core.tests/build.properties
deleted file mode 100644
index 162192b..0000000
--- a/tests/org.eclipse.jst.server.core.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- tests.jar
-src.includes = build.properties
-jars.compile.order = tests.jar
-source.tests.jar = src/
-output.tests.jar = bin/
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/plugin.xml b/tests/org.eclipse.jst.server.core.tests/plugin.xml
deleted file mode 100644
index 6ef4911..0000000
--- a/tests/org.eclipse.jst.server.core.tests/plugin.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.core.tests"
- name="org.eclipse.jst.server.core.tests"
- version="1.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.jst.server.core.tests.TestsPlugin">
-
- <runtime>
- <library name="tests.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.jdt.core"/>
- <import plugin="org.eclipse.jdt.launching"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.jst.server.core"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/AllTests.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/AllTests.java
deleted file mode 100644
index 0a3d3ce..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/AllTests.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.server.core.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- suite.addTest(new OrderedTestSuite(GenericRuntimeTestCase.class));
-
- suite.addTest(new OrderedTestSuite(J2EEModuleTestCase.class));
- suite.addTest(new OrderedTestSuite(ApplicationClientTestCase.class));
- suite.addTest(new OrderedTestSuite(ConnectorModuleTestCase.class));
- suite.addTest(new OrderedTestSuite(EJBModuleTestCase.class));
- suite.addTest(new OrderedTestSuite(WebModuleTestCase.class));
- suite.addTest(new OrderedTestSuite(EnterpriseApplicationTestCase.class));
-
- suite.addTest(new OrderedTestSuite(LooseArchiveTestCase.class));
- suite.addTest(new OrderedTestSuite(LooseArchiveSupportTestCase.class));
-
- suite.addTest(new OrderedTestSuite(EJBBeanTestCase.class));
- suite.addTest(new OrderedTestSuite(ServletTestCase.class));
- suite.addTest(new OrderedTestSuite(JndiObjectTestCase.class));
- suite.addTest(new OrderedTestSuite(JndiLaunchableTestCase.class));
-
- suite.addTest(new OrderedTestSuite(ClasspathRuntimeTargetHandlerTestCase.class));
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ApplicationClientTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ApplicationClientTestCase.java
deleted file mode 100644
index 397ada2..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ApplicationClientTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.IApplicationClientModule;
-import org.eclipse.jst.server.core.tests.impl.TestApplicationClientModule;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class ApplicationClientTestCase extends TestCase {
- protected static IApplicationClientModule module;
-
- public static Test suite() {
- return new OrderedTestSuite(ApplicationClientTestCase.class, "ApplicationClientTestCase");
- }
-
- public void test00Create() {
- module = new TestApplicationClientModule();
- }
-
- public void test01SpecVersion() {
- module.getJ2EESpecificationVersion();
- }
-
- public void test02Location() {
- module.getLocation();
- }
-
- public void test03Binary() {
- module.isBinary();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ClasspathRuntimeTargetHandlerTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ClasspathRuntimeTargetHandlerTestCase.java
deleted file mode 100644
index 57fbc00..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ClasspathRuntimeTargetHandlerTestCase.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.ClasspathRuntimeTargetHandler;
-import org.eclipse.jst.server.core.tests.impl.TestClasspathRuntimeTargetHandler;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class ClasspathRuntimeTargetHandlerTestCase extends TestCase {
- protected static ClasspathRuntimeTargetHandler handler;
-
- public static Test suite() {
- return new OrderedTestSuite(ClasspathRuntimeTargetHandlerTestCase.class, "ClasspathRuntimeTargetHandlerTestCase");
- }
-
- public void test00Create() {
- handler = new TestClasspathRuntimeTargetHandler();
- }
-
- public void test01GetClasspathContainerLabel() {
- handler.getClasspathContainerLabel(null, null);
- }
-
- public void test02GetClasspathEntryIds() {
- handler.getClasspathEntryIds();
- }
-
- public void test03ResolveClasspathContainer() {
- handler.resolveClasspathContainer(null, null);
- }
-
- public void test04ResolveClasspathContainerImpl() {
- handler.resolveClasspathContainerImpl(null, null);
- }
-
- public void test05TestAddMethods() {
- ((TestClasspathRuntimeTargetHandler) handler).testAddMethods();
- }
-
- public void test06SetRuntimeTarget() throws Exception {
- handler.setRuntimeTarget(null, null, null);
- }
-
- public void test07RemoveRuntimeTarget() {
- handler.removeRuntimeTarget(null, null, null);
- }
-
- public void test08ResolveList() {
- ((TestClasspathRuntimeTargetHandler) handler).testResolveList();
- }
-
- public void test09GetDelegateClasspathEntries() {
- handler.getDelegateClasspathEntries(null, null);
- }
-
- public void test10RequestClasspathContainerUpdate() {
- handler.requestClasspathContainerUpdate(null, null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ConnectorModuleTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ConnectorModuleTestCase.java
deleted file mode 100644
index 1aacb88..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ConnectorModuleTestCase.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.IConnectorModule;
-import org.eclipse.jst.server.core.tests.impl.TestConnectorModule;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class ConnectorModuleTestCase extends TestCase {
- protected static IConnectorModule module;
-
- public static Test suite() {
- return new OrderedTestSuite(ConnectorModuleTestCase.class, "ConnectorModuleTestCase");
- }
-
- public void test00Create() {
- module = new TestConnectorModule();
- }
-
- public void test01SpecVersion() {
- module.getJ2EESpecificationVersion();
- }
-
- public void test02Location() {
- module.getLocation();
- }
-
- public void test03Binary() {
- module.isBinary();
- }
-
- public void test04Classpath() {
- module.getClasspath();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EJBBeanTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EJBBeanTestCase.java
deleted file mode 100644
index 8529c17..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EJBBeanTestCase.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.EJBBean;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class EJBBeanTestCase extends TestCase {
- protected static EJBBean bean;
-
- public static Test suite() {
- return new OrderedTestSuite(EJBBeanTestCase.class, "EJBBeanTestCase");
- }
-
- public void test00Create() {
- bean = new EJBBean(null, "test", false, true);
- }
-
- public void test01GetModule() {
- assertNull(bean.getModule());
- }
-
- public void test02GetJNDIName() {
- assertEquals(bean.getJndiName(), "test");
- }
-
- public void test03Local() {
- assertTrue(bean.hasLocalInterface());
- }
-
- public void test04Remote() {
- assertFalse(bean.hasRemoteInterface());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EJBModuleTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EJBModuleTestCase.java
deleted file mode 100644
index 8e5530f..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EJBModuleTestCase.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.IEJBModule;
-import org.eclipse.jst.server.core.tests.impl.TestEJBModule;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class EJBModuleTestCase extends TestCase {
- protected static IEJBModule module;
-
- public static Test suite() {
- return new OrderedTestSuite(EJBModuleTestCase.class, "EJBModuleTestCase");
- }
-
- public void test00Create() {
- module = new TestEJBModule();
- }
-
- public void test01SpecVersion() {
- module.getJ2EESpecificationVersion();
- }
-
- public void test02Location() {
- module.getLocation();
- }
-
- public void test03Binary() {
- module.isBinary();
- }
-
- public void test04EJBSpecVersion() {
- module.getEJBSpecificationVersion();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EnterpriseApplicationTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EnterpriseApplicationTestCase.java
deleted file mode 100644
index 4ae7b2f..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/EnterpriseApplicationTestCase.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.jst.server.core.tests.impl.TestEnterpriseApplication;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class EnterpriseApplicationTestCase extends TestCase {
- protected static IEnterpriseApplication app;
-
- public static Test suite() {
- return new OrderedTestSuite(EnterpriseApplicationTestCase.class, "EnterpriseApplicationTestCase");
- }
-
- public void test00Create() {
- app = new TestEnterpriseApplication();
- }
-
- public void test01SpecVersion() {
- app.getJ2EESpecificationVersion();
- }
-
- public void test02Location() {
- app.getLocation();
- }
-
- public void test03Modules() {
- app.getModules();
- }
-
- public void test04URI() {
- app.getURI(null);
- }
-
- public void test05LooseModules() {
- app.containsLooseModules();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ExistenceTest.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ExistenceTest.java
deleted file mode 100644
index bf33320..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ExistenceTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.internal.JavaServerPlugin;
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(JavaServerPlugin.getInstance());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/GenericRuntimeTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/GenericRuntimeTestCase.java
deleted file mode 100644
index 4a9ad64..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/GenericRuntimeTestCase.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.server.core.GenericRuntimeUtil;
-import org.eclipse.jst.server.core.IGenericRuntime;
-import org.eclipse.jst.server.core.IGenericRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.*;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class GenericRuntimeTestCase extends TestCase {
- private static final String RUNTIME_TYPE_ID = "org.eclipse.jst.server.core.runtimeType";
-
- protected static IRuntime runtime;
- protected static IRuntime runtimeWC;
- protected static IGenericRuntime genericRuntime;
- protected static IGenericRuntimeWorkingCopy genericRuntimeWC;
-
- public static Test suite() {
- return new OrderedTestSuite(GenericRuntimeTestCase.class, "GenericRuntimeTestCase");
- }
-
- public void test00CreateRuntime() throws Exception {
- IRuntimeType rt = ServerCore.findRuntimeType(RUNTIME_TYPE_ID);
- IRuntimeWorkingCopy wc = rt.createRuntime("a", null);
- wc.setLocation(new Path("c://test"));
- runtime = wc.save(false, null);
-
- assertTrue(!runtime.isWorkingCopy());
- }
-
- public void test01ValidateRuntime() throws Exception {
- IStatus status = runtime.validate(null);
- assertTrue(!status.isOK());
- }
-
- public void test02Util() throws Exception {
- assertTrue(GenericRuntimeUtil.isGenericJ2EERuntime(runtime));
- }
-
- public void test03Adapt() throws Exception {
- genericRuntime = (IGenericRuntime) runtime.getAdapter(IGenericRuntime.class);
- assertNotNull(genericRuntime);
- }
-
- public void test04Adapt() throws Exception {
- assertNotNull(runtime.getAdapter(IGenericRuntimeWorkingCopy.class));
- }
-
- public void test05GetJVM() throws Exception {
- assertNotNull(genericRuntime.getVMInstall());
- }
-
- public void test06Adapt() throws Exception {
- runtimeWC = runtime.createWorkingCopy();
- genericRuntimeWC = (IGenericRuntimeWorkingCopy) runtimeWC.getAdapter(IGenericRuntimeWorkingCopy.class);
- assertNotNull(genericRuntimeWC);
- }
-
- public void test07Adapt() throws Exception {
- assertNotNull(runtimeWC.getAdapter(IGenericRuntime.class));
- }
-
- public void test08SetJVM() throws Exception {
- assertNotNull(genericRuntimeWC.getVMInstall());
- genericRuntimeWC.setVMInstall(null);
- assertNull(genericRuntimeWC.getVMInstall());
- }
-
- public void test09DeleteRuntime() throws Exception {
- runtime.delete();
- runtime = null;
- runtimeWC = null;
- genericRuntime = null;
- genericRuntimeWC = null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/J2EEModuleTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/J2EEModuleTestCase.java
deleted file mode 100644
index 3ad3289..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/J2EEModuleTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.IJ2EEModule;
-import org.eclipse.jst.server.core.tests.impl.TestJ2EEModule;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class J2EEModuleTestCase extends TestCase {
- protected static IJ2EEModule module;
-
- public static Test suite() {
- return new OrderedTestSuite(J2EEModuleTestCase.class, "J2EEModuleTestCase");
- }
-
- public void test00Create() {
- module = new TestJ2EEModule();
- }
-
- public void test01SpecVersion() {
- module.getJ2EESpecificationVersion();
- }
-
- public void test02Location() {
- module.getLocation();
- }
-
- public void test03Binary() {
- module.isBinary();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/JndiLaunchableTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/JndiLaunchableTestCase.java
deleted file mode 100644
index c4828b9..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/JndiLaunchableTestCase.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.JndiLaunchable;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class JndiLaunchableTestCase extends TestCase {
- protected static JndiLaunchable launch;
-
- public static Test suite() {
- return new OrderedTestSuite(JndiLaunchableTestCase.class, "JndiLaunchableTestCase");
- }
-
- public void test00Create() {
- launch = new JndiLaunchable(null, "test");
- }
-
- public void test01GetProperties() {
- assertNull(launch.getProperties());
- }
-
- public void test02GetJNDIName() {
- assertEquals(launch.getJNDIName(), "test");
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/JndiObjectTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/JndiObjectTestCase.java
deleted file mode 100644
index f3bf45a..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/JndiObjectTestCase.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.JndiObject;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class JndiObjectTestCase extends TestCase {
- protected static JndiObject obj;
-
- public static Test suite() {
- return new OrderedTestSuite(JndiObjectTestCase.class, "JndiObjectTestCase");
- }
-
- public void test00Create() {
- obj = new JndiObject(null, "test");
- }
-
- public void test01GetModule() {
- assertNull(obj.getModule());
- }
-
- public void test02GetJNDIName() {
- assertEquals(obj.getJndiName(), "test");
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/LooseArchiveSupportTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/LooseArchiveSupportTestCase.java
deleted file mode 100644
index c0acd8e..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/LooseArchiveSupportTestCase.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.ILooseArchiveSupport;
-import org.eclipse.jst.server.core.tests.impl.TestLooseArchiveSupport;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class LooseArchiveSupportTestCase extends TestCase {
- protected static ILooseArchiveSupport archive;
-
- public static Test suite() {
- return new OrderedTestSuite(LooseArchiveSupportTestCase.class, "LooseArchiveSupportTestCase");
- }
-
- public void test00Create() {
- archive = new TestLooseArchiveSupport();
- }
-
- public void test01GetLooseArchives() {
- archive.getLooseArchives();
- }
-
- public void test02GetURI() {
- archive.getURI(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/LooseArchiveTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/LooseArchiveTestCase.java
deleted file mode 100644
index fdab6b4..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/LooseArchiveTestCase.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.ILooseArchive;
-import org.eclipse.jst.server.core.tests.impl.TestLooseArchive;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class LooseArchiveTestCase extends TestCase {
- protected static ILooseArchive archive;
-
- public static Test suite() {
- return new OrderedTestSuite(LooseArchiveTestCase.class, "LooseArchiveTestCase");
- }
-
- public void test00Create() {
- archive = new TestLooseArchive();
- }
-
- public void test01Location() {
- archive.getLocation();
- }
-
- public void test02Binary() {
- archive.isBinary();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/OrderedTestSuite.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/OrderedTestSuite.java
deleted file mode 100644
index b7ad8e1..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.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.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ServletTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ServletTestCase.java
deleted file mode 100644
index a410d8e..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/ServletTestCase.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.Servlet;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class ServletTestCase extends TestCase {
- protected static Servlet servlet;
-
- public static Test suite() {
- return new OrderedTestSuite(ServletTestCase.class, "ServletTestCase");
- }
-
- public void test00Create() {
- servlet = new Servlet(null, "class", "alias");
- }
-
- public void test01GetModule() {
- assertNull(servlet.getModule());
- }
-
- public void test02GetClassName() {
- assertEquals(servlet.getServletClassName(), "class");
- }
-
- public void test02GetAlias() {
- assertEquals(servlet.getAlias(), "alias");
- }
-
- public void test03ToString() {
- servlet.toString();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/TestsPlugin.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/TestsPlugin.java
deleted file mode 100644
index 44d315d..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.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.jst.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.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/WebModuleTestCase.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/WebModuleTestCase.java
deleted file mode 100644
index f3197b9..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/WebModuleTestCase.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests;
-
-import org.eclipse.jst.server.core.IWebModule;
-import org.eclipse.jst.server.core.tests.impl.TestWebModule;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class WebModuleTestCase extends TestCase {
- protected static IWebModule module;
-
- public static Test suite() {
- return new OrderedTestSuite(WebModuleTestCase.class, "WebModuleTestCase");
- }
-
- public void test00Create() {
- module = new TestWebModule();
- }
-
- public void test01SpecVersion() {
- module.getJ2EESpecificationVersion();
- }
-
- public void test02Location() {
- module.getLocation();
- }
-
- public void test03Binary() {
- module.isBinary();
- }
-
- public void test04JSPVersion() {
- module.getJSPSpecificationVersion();
- }
-
- public void test05ServerVersion() {
- module.getServletSpecificationVersion();
- }
-
- public void test06ContextRoot() {
- module.getContextRoot();
- }
-
- public void test07PublishRequired() {
- module.isPublishRequired();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestApplicationClientModule.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestApplicationClientModule.java
deleted file mode 100644
index 19369c5..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestApplicationClientModule.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.jst.server.core.IApplicationClientModule;
-
-public class TestApplicationClientModule extends TestJ2EEModule implements IApplicationClientModule {
- // no additonal methods
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestClasspathRuntimeTargetHandler.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestClasspathRuntimeTargetHandler.java
deleted file mode 100644
index ceb752f..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestClasspathRuntimeTargetHandler.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import java.util.*;
-import java.io.File;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jst.server.core.ClasspathRuntimeTargetHandler;
-import org.eclipse.wst.server.core.IRuntime;
-/**
- *
- */
-public class TestClasspathRuntimeTargetHandler extends ClasspathRuntimeTargetHandler {
- public String getClasspathContainerLabel(IRuntime runtime, String id) {
- return null;
- }
-
- public IClasspathEntry[] resolveClasspathContainer(IRuntime runtime, String id) {
- return null;
- }
-
- public void testAddMethods() {
- List list = new ArrayList();
- try {
- addJarFiles(null, list, false);
- addLibraryEntries(list, null, false);
- addLibraryEntry(list, (File) null);
- addLibraryEntry(list, (IPath) null);
- addLibraryEntry(list, null, null, null);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testResolveList() {
- resolveList(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestConnectorModule.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestConnectorModule.java
deleted file mode 100644
index 152ec14..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestConnectorModule.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.server.core.IConnectorModule;
-
-public class TestConnectorModule extends TestJ2EEModule implements IConnectorModule {
- public IPath[] getClasspath() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestEJBModule.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestEJBModule.java
deleted file mode 100644
index 7676c6c..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestEJBModule.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.jst.server.core.IEJBModule;
-
-public class TestEJBModule extends TestJ2EEModule implements IEJBModule {
- public String getEJBSpecificationVersion() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestEnterpriseApplication.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestEnterpriseApplication.java
deleted file mode 100644
index 530974f..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestEnterpriseApplication.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
-import org.eclipse.jst.server.core.IJ2EEModule;
-
-public class TestEnterpriseApplication implements IEnterpriseApplication {
- public String getJ2EESpecificationVersion() {
- return null;
- }
-
- public IPath getLocation() {
- return null;
- }
-
- public IJ2EEModule[] getModules() {
- return null;
- }
-
- public String getURI(IJ2EEModule module) {
- return null;
- }
-
- public boolean containsLooseModules() {
- return false;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestJ2EEModule.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestJ2EEModule.java
deleted file mode 100644
index f9fb69c..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestJ2EEModule.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.server.core.IJ2EEModule;
-
-public class TestJ2EEModule implements IJ2EEModule {
- public String getJ2EESpecificationVersion() {
- return null;
- }
-
- public IPath getLocation() {
- return null;
- }
-
- public boolean isBinary() {
- return false;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestLooseArchive.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestLooseArchive.java
deleted file mode 100644
index ae35d5f..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestLooseArchive.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.server.core.ILooseArchive;
-
-public class TestLooseArchive implements ILooseArchive {
- public IPath getLocation() {
- return null;
- }
-
- public boolean isBinary() {
- return false;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestLooseArchiveSupport.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestLooseArchiveSupport.java
deleted file mode 100644
index ba7c4a4..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestLooseArchiveSupport.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.jst.server.core.ILooseArchive;
-import org.eclipse.jst.server.core.ILooseArchiveSupport;
-
-public class TestLooseArchiveSupport implements ILooseArchiveSupport {
- public ILooseArchive[] getLooseArchives() {
- return null;
- }
-
- public String getURI(ILooseArchive archive) {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestWebModule.java b/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestWebModule.java
deleted file mode 100644
index eb28c36..0000000
--- a/tests/org.eclipse.jst.server.core.tests/src/org/eclipse/jst/server/core/tests/impl/TestWebModule.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.core.tests.impl;
-
-import org.eclipse.jst.server.core.IWebModule;
-
-public class TestWebModule extends TestJ2EEModule implements IWebModule {
- public String getServletSpecificationVersion() {
- return null;
- }
-
- public String getJSPSpecificationVersion() {
- return null;
- }
-
- public String getContextRoot() {
- return null;
- }
-
- public boolean isPublishRequired() {
- return false;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.core.tests/test.xml b/tests/org.eclipse.jst.server.core.tests/test.xml
deleted file mode 100644
index 1926ae0..0000000
--- a/tests/org.eclipse.jst.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.jst.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.jst.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.jst.server.tomcat.core.tests/.classpath b/tests/org.eclipse.jst.server.tomcat.core.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.jst.server.tomcat.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.jst.server.tomcat.core.tests/.cvsignore b/tests/org.eclipse.jst.server.tomcat.core.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/.project b/tests/org.eclipse.jst.server.tomcat.core.tests/.project
deleted file mode 100644
index e2c044e..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.tomcat.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.jst.server.tomcat.core.tests/build.properties b/tests/org.eclipse.jst.server.tomcat.core.tests/build.properties
deleted file mode 100644
index 703c630..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- tests.jar
-src.includes = build.properties
-jars.compile.order = tests.jar
-source.tests.jar = src/
-output.tests.jar = bin/
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/plugin.xml b/tests/org.eclipse.jst.server.tomcat.core.tests/plugin.xml
deleted file mode 100644
index 1338894..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.tomcat.core.tests"
- name="org.eclipse.jst.server.tomcat.core.tests"
- version="1.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.jst.server.tomcat.core.tests.TestsPlugin">
-
- <runtime>
- <library name="tests.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.jdt.launching"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.jst.server.core"/>
- <import plugin="org.eclipse.jst.server.tomcat.core"/>
- <import plugin="org.eclipse.wst.server.core.tests"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatRuntimeTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatRuntimeTestCase.java
deleted file mode 100644
index e15c4f7..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatRuntimeTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.tests.ext.AbstractRuntimeTestCase;
-
-public abstract class AbstractTomcatRuntimeTestCase extends AbstractRuntimeTestCase {
- protected abstract String getRuntimeTypeId();
-
- public IRuntime createRuntime() throws Exception {
- try {
- IRuntimeWorkingCopy wc = createRuntime(getRuntimeTypeId());
- return wc.save(true, null);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- }
-
- public void deleteRuntime(IRuntime runtime2) throws Exception {
- runtime2.delete();
- }
-
- protected static IRuntimeWorkingCopy createRuntime(String runtimeTypeId) throws Exception {
- IRuntimeType rt = ServerCore.findRuntimeType(runtimeTypeId);
- IRuntimeWorkingCopy wc = rt.createRuntime(null, null);
- wc.setLocation(new Path(RuntimeLocation.runtimeLocation));
- return wc;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatServerTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatServerTestCase.java
deleted file mode 100644
index 259847b..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AbstractTomcatServerTestCase.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-import junit.framework.Test;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.server.tomcat.core.internal.ITomcatConfigurationWorkingCopy;
-import org.eclipse.jst.server.tomcat.core.internal.TomcatServer;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.tests.ext.AbstractServerTestCase;
-
-public abstract class AbstractTomcatServerTestCase extends AbstractServerTestCase {
- public static Test suite() {
- return new OrderedTestSuite(AbstractTomcatServerTestCase.class, "TomcatServerTestCase");
- }
-
- protected abstract String getServerTypeId();
-
- public IServer createServer() throws Exception {
- try {
- IServerWorkingCopy wc = createServer(getServerTypeId());
- return wc.save(true, null);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- }
-
- public void deleteServer(IServer server2) throws Exception {
- server2.getRuntime().delete();
- server2.delete();
- }
-
- protected IRuntime createRuntime() {
- try {
- IServerType st = ServerCore.findServerType(getServerTypeId());
- IRuntimeWorkingCopy wc = createRuntime(st.getRuntimeType());
- return wc.save(true, null);
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- }
-
- protected IRuntimeWorkingCopy createRuntime(IRuntimeType rt) throws Exception {
- IRuntimeWorkingCopy wc = rt.createRuntime(null, null);
- wc.setLocation(new Path(RuntimeLocation.runtimeLocation));
- return wc;
- }
-
- protected IServerWorkingCopy createServer(String serverTypeId) throws Exception {
- IServerType st = ServerCore.findServerType(serverTypeId);
- IRuntime runtime = createRuntime();
- IServerWorkingCopy wc = st.createServer(null, null, runtime, null);
-
- IServerPort[] ports = wc.getServerPorts();
- TomcatServer tomcatServer = (TomcatServer) wc.getAdapter(TomcatServer.class);
- ITomcatConfigurationWorkingCopy configuration = (ITomcatConfigurationWorkingCopy) tomcatServer.getServerConfiguration();
- if (ports != null) {
- int size = ports.length;
- for (int i = 0; i < size; i++) {
- configuration.modifyServerPort(ports[i].getId(), 22100 + i);
- }
- }
-
- return wc;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AllTests.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AllTests.java
deleted file mode 100644
index 3f23ce2..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/AllTests.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.server.tomcat.core.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- suite.addTest(new OrderedTestSuite(TomcatRuntimeTestCase.class));
-
- String s = System.getProperty("org.eclipse.jst.server.tomcat.32");
- //s = "D:\\Tools\\tomcat\\jakarta-tomcat-3.2.4";
- if (s != null && s.length() > 0) {
- RuntimeLocation.runtimeLocation = s;
- suite.addTest(new OrderedTestSuite(Tomcat32RuntimeTestCase.class));
- suite.addTest(new OrderedTestSuite(Tomcat32ServerTestCase.class));
- }
-
- s = System.getProperty("org.eclipse.jst.server.tomcat.40");
- if (s != null && s.length() > 0) {
- RuntimeLocation.runtimeLocation = s;
- suite.addTest(new OrderedTestSuite(Tomcat40RuntimeTestCase.class));
- suite.addTest(new OrderedTestSuite(Tomcat40ServerTestCase.class));
- }
-
- s = System.getProperty("org.eclipse.jst.server.tomcat.41");
- if (s != null && s.length() > 0) {
- RuntimeLocation.runtimeLocation = s;
- suite.addTest(new OrderedTestSuite(Tomcat41RuntimeTestCase.class));
- suite.addTest(new OrderedTestSuite(Tomcat41ServerTestCase.class));
- }
-
- s = System.getProperty("org.eclipse.jst.server.tomcat.50");
- //s = "D:\\Tools\\tomcat\\jakarta-tomcat-5.0.19";
- if (s != null && s.length() > 0) {
- RuntimeLocation.runtimeLocation = s;
- suite.addTest(new OrderedTestSuite(Tomcat50RuntimeTestCase.class));
- suite.addTest(new OrderedTestSuite(Tomcat50ServerTestCase.class));
- }
-
- s = System.getProperty("org.eclipse.jst.server.tomcat.55");
- if (s != null && s.length() > 0) {
- RuntimeLocation.runtimeLocation = s;
- suite.addTest(new OrderedTestSuite(Tomcat55RuntimeTestCase.class));
- suite.addTest(new OrderedTestSuite(Tomcat55ServerTestCase.class));
- }
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/ExistenceTest.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/ExistenceTest.java
deleted file mode 100644
index ed07364..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/ExistenceTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-import org.eclipse.jst.server.tomcat.core.internal.TomcatPlugin;
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(TomcatPlugin.getInstance());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/OrderedTestSuite.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/OrderedTestSuite.java
deleted file mode 100644
index 718075d..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.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.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/RuntimeLocation.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/RuntimeLocation.java
deleted file mode 100644
index cb4eef6..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/RuntimeLocation.java
+++ /dev/null
@@ -1,15 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class RuntimeLocation {
- public static String runtimeLocation;
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/TestsPlugin.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/TestsPlugin.java
deleted file mode 100644
index 9566d7e..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.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.jst.server.tomcat.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.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat32RuntimeTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat32RuntimeTestCase.java
deleted file mode 100644
index e4371e8..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat32RuntimeTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat32RuntimeTestCase extends AbstractTomcatRuntimeTestCase {
- protected String getRuntimeTypeId() {
- return "org.eclipse.jst.server.tomcat.runtime.32";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat32ServerTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat32ServerTestCase.java
deleted file mode 100644
index b67e715..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat32ServerTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat32ServerTestCase extends AbstractTomcatServerTestCase {
- protected String getServerTypeId() {
- return "org.eclipse.jst.server.tomcat.32";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat40RuntimeTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat40RuntimeTestCase.java
deleted file mode 100644
index 2d2c678..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat40RuntimeTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat40RuntimeTestCase extends AbstractTomcatRuntimeTestCase {
- protected String getRuntimeTypeId() {
- return "org.eclipse.jst.server.tomcat.runtime.40";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat40ServerTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat40ServerTestCase.java
deleted file mode 100644
index b928647..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat40ServerTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat40ServerTestCase extends AbstractTomcatServerTestCase {
- protected String getServerTypeId() {
- return "org.eclipse.jst.server.tomcat.40";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat41RuntimeTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat41RuntimeTestCase.java
deleted file mode 100644
index f3f6247..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat41RuntimeTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat41RuntimeTestCase extends AbstractTomcatRuntimeTestCase {
- protected String getRuntimeTypeId() {
- return "org.eclipse.jst.server.tomcat.runtime.41";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat41ServerTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat41ServerTestCase.java
deleted file mode 100644
index 30c234e..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat41ServerTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat41ServerTestCase extends AbstractTomcatServerTestCase {
- protected String getServerTypeId() {
- return "org.eclipse.jst.server.tomcat.41";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat50RuntimeTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat50RuntimeTestCase.java
deleted file mode 100644
index b401191..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat50RuntimeTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat50RuntimeTestCase extends AbstractTomcatRuntimeTestCase {
- protected String getRuntimeTypeId() {
- return "org.eclipse.jst.server.tomcat.runtime.50";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat50ServerTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat50ServerTestCase.java
deleted file mode 100644
index bb16a2d..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat50ServerTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat50ServerTestCase extends AbstractTomcatServerTestCase {
- protected String getServerTypeId() {
- return "org.eclipse.jst.server.tomcat.50";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat55RuntimeTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat55RuntimeTestCase.java
deleted file mode 100644
index 44bb45d..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat55RuntimeTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat55RuntimeTestCase extends AbstractTomcatRuntimeTestCase {
- protected String getRuntimeTypeId() {
- return "org.eclipse.jst.server.tomcat.runtime.55";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat55ServerTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat55ServerTestCase.java
deleted file mode 100644
index dd3081c..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/Tomcat55ServerTestCase.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-public class Tomcat55ServerTestCase extends AbstractTomcatServerTestCase {
- protected String getServerTypeId() {
- return "org.eclipse.jst.server.tomcat.55";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/TomcatRuntimeTestCase.java b/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/TomcatRuntimeTestCase.java
deleted file mode 100644
index f407783..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/src/org/eclipse/jst/server/tomcat/core/tests/TomcatRuntimeTestCase.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.core.tests;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.server.tomcat.core.internal.ITomcatRuntime;
-import org.eclipse.jst.server.tomcat.core.internal.ITomcatRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.*;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class TomcatRuntimeTestCase extends TestCase {
- private static final String RUNTIME_TYPE_ID_32 = "org.eclipse.jst.server.tomcat.runtime.32";
- private static final String RUNTIME_TYPE_ID_40 = "org.eclipse.jst.server.tomcat.runtime.40";
- private static final String RUNTIME_TYPE_ID_41 = "org.eclipse.jst.server.tomcat.runtime.41";
- private static final String RUNTIME_TYPE_ID_50 = "org.eclipse.jst.server.tomcat.runtime.50";
- private static final String RUNTIME_TYPE_ID_55 = "org.eclipse.jst.server.tomcat.runtime.55";
-
- protected static IRuntime runtime;
- protected static ITomcatRuntime tomcatRuntime;
-
- public static Test suite() {
- return new OrderedTestSuite(TomcatRuntimeTestCase.class, "TomcatRuntimeTestCase");
- }
-
- protected IRuntimeWorkingCopy createRuntime(String runtimeTypeId) throws Exception {
- IRuntimeType rt = ServerCore.findRuntimeType(runtimeTypeId);
- IRuntimeWorkingCopy wc = rt.createRuntime("a", null);
- wc.setLocation(new Path("c://test"));
- return wc;
- }
-
- public void test00CreateRuntime() throws Exception {
- runtime = createRuntime(RUNTIME_TYPE_ID_32).save(false, null);
- assertTrue(!runtime.isWorkingCopy());
- }
-
- protected void validateRuntime() throws Exception {
- IStatus status = runtime.validate(null);
- assertTrue(!status.isOK());
- }
-
- protected void adaptRuntime() throws Exception {
- tomcatRuntime = (ITomcatRuntime) runtime.getAdapter(ITomcatRuntime.class);
- assertNotNull(tomcatRuntime);
- assertNotNull(tomcatRuntime.getVMInstall());
- assertNotNull(tomcatRuntime.getRuntimeClasspath());
- }
-
- protected void modifyRuntime() throws Exception {
- IRuntimeWorkingCopy wc = runtime.createWorkingCopy();
- ITomcatRuntimeWorkingCopy trwc = (ITomcatRuntimeWorkingCopy) wc.getAdapter(ITomcatRuntimeWorkingCopy.class);
- trwc.setVMInstall(null);
- wc.save(true, null);
- tomcatRuntime = (ITomcatRuntime) runtime.getAdapter(ITomcatRuntime.class);
- assertNull(tomcatRuntime.getVMInstall());
- }
-
- protected void deleteRuntime() throws Exception {
- runtime.delete();
- runtime = null;
- tomcatRuntime = null;
- }
-
- public void test01ValidateRuntime() throws Exception {
- validateRuntime();
- }
-
- public void test02AdaptRuntime() throws Exception {
- adaptRuntime();
- }
-
- public void test03ModifyRuntime() throws Exception {
- modifyRuntime();
- }
-
- public void test04DeleteRuntime() throws Exception {
- deleteRuntime();
- }
-
- public void test10CreateRuntime() throws Exception {
- runtime = createRuntime(RUNTIME_TYPE_ID_40).save(false, null);
- assertTrue(!runtime.isWorkingCopy());
- }
-
- public void test11ValidateRuntime() throws Exception {
- validateRuntime();
- }
-
- public void test12AdaptRuntime() throws Exception {
- adaptRuntime();
- }
-
- public void test13ModifyRuntime() throws Exception {
- modifyRuntime();
- }
-
- public void test14DeleteRuntime() throws Exception {
- deleteRuntime();
- }
-
- public void test20CreateRuntime() throws Exception {
- runtime = createRuntime(RUNTIME_TYPE_ID_41).save(false, null);
- assertTrue(!runtime.isWorkingCopy());
- }
-
- public void test21ValidateRuntime() throws Exception {
- validateRuntime();
- }
-
- public void test22AdaptRuntime() throws Exception {
- adaptRuntime();
- }
-
- public void test23ModifyRuntime() throws Exception {
- modifyRuntime();
- }
-
- public void test24DeleteRuntime() throws Exception {
- deleteRuntime();
- }
-
- public void test30CreateRuntime() throws Exception {
- runtime = createRuntime(RUNTIME_TYPE_ID_50).save(false, null);
- assertTrue(!runtime.isWorkingCopy());
- }
-
- public void test31ValidateRuntime() throws Exception {
- validateRuntime();
- }
-
- public void test32AdaptRuntime() throws Exception {
- adaptRuntime();
- }
-
- public void test33ModifyRuntime() throws Exception {
- modifyRuntime();
- }
-
- public void test34DeleteRuntime() throws Exception {
- deleteRuntime();
- }
-
- public void test40CreateRuntime() throws Exception {
- runtime = createRuntime(RUNTIME_TYPE_ID_55).save(false, null);
- assertTrue(!runtime.isWorkingCopy());
- }
-
- public void test41ValidateRuntime() throws Exception {
- validateRuntime();
- }
-
- public void test42AdaptRuntime() throws Exception {
- adaptRuntime();
- }
-
- public void test43ModifyRuntime() throws Exception {
- modifyRuntime();
- }
-
- public void test44DeleteRuntime() throws Exception {
- deleteRuntime();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.core.tests/test.xml b/tests/org.eclipse.jst.server.tomcat.core.tests/test.xml
deleted file mode 100644
index f7b1bef..0000000
--- a/tests/org.eclipse.jst.server.tomcat.core.tests/test.xml
+++ /dev/null
@@ -1,51 +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.tomcat.core.tests"/>
- <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
- <property name="extraVMargs" value="-Dorg.eclipse.jst.server.tomcat.50=${testDir}/${tomcat50Dir}"/>
-
- <!-- 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.jst.server.tomcat.core.tests.AllTests"/>
- <property name="plugin-path" value="${eclipse-home}/plugins/${plugin-name}"/>
- <property name="extraVMargs" value="${extraVMargs}"/>
- </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/.classpath b/tests/org.eclipse.jst.server.tomcat.tests.performance/.classpath
deleted file mode 100644
index 9742e41..0000000
--- a/tests/org.eclipse.jst.server.tomcat.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.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.jst.server.tomcat.tests.performance/.project b/tests/org.eclipse.jst.server.tomcat.tests.performance/.project
deleted file mode 100644
index 611ace0..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.tomcat.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.jst.server.tomcat.tests.performance/build.properties b/tests/org.eclipse.jst.server.tomcat.tests.performance/build.properties
deleted file mode 100644
index 8753b24..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = performance.jar,\
- performancesrc.zip,\
- plugin.xml,\
- test.xml
-source.performance.jar = performance/
-output.performance.jar = bin/
-src.includes = build.properties
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/PerformancePlugin.java b/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/PerformancePlugin.java
deleted file mode 100644
index fb54b6d..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/PerformancePlugin.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.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.jst.server.tomcat.tests.performance.PerformancePluginResources");
- } catch (MissingResourceException x) {
- resourceBundle = null;
- }
- return resourceBundle;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/AllTests.java b/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/AllTests.java
deleted file mode 100644
index 3230b2c..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/AllTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.tests.performance.tomcat50;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.server.tomcat.tests.performance.tomcat50");
- //$JUnit-BEGIN$
- /*suite.addTestSuite(GetDelegateTestCase.class);
- suite.addTestSuite(OpenEditorTestCase.class);
- suite.addTestSuite(ServerActionsTestCase.class);*/
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/GetDelegateTestCase.java b/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/GetDelegateTestCase.java
deleted file mode 100644
index 0bac9eb..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/GetDelegateTestCase.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.tests.performance.tomcat50;
-
-import java.io.File;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.jst.server.tomcat.core.internal.ITomcatRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.tests.performance.common.AbstractGetDelegateTestCase;
-public class GetDelegateTestCase extends AbstractGetDelegateTestCase {
- public static Test suite() {
- return new TestSuite(GetDelegateTestCase.class, "GetDelegateTestCase");
- }
-
- 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.setReadOnly(false);
- IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();
- ITomcatRuntimeWorkingCopy rwc = (ITomcatRuntimeWorkingCopy) runtimeCopy
- .getAdapter(ITomcatRuntimeWorkingCopy.class);
- rwc.setVMInstall(vmInstall);
- runtimeCopy.save(false, null);
- return runtimeCopy;
- }
-
- protected String getRuntimeTypeId() {
- return "org.eclipse.jst.server.tomcat.50.runtime";
- }
-
- protected String getRuntimeTypeLocation() {
- String location = System.getProperty("org.eclipse.jst.server.tomcat.50");
- assertNotNull(location);
- assertTrue((new File(location)).exists());
- return location;
- }
-
- protected String getServerTypeId() {
- return "org.eclipse.jst.server.tomcat.50";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/OpenEditorTestCase.java b/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/OpenEditorTestCase.java
deleted file mode 100644
index 716436c..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/performance/org/eclipse/jst/server/tomcat/tests/performance/tomcat50/OpenEditorTestCase.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.tests.performance.tomcat50;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-import org.eclipse.wst.server.tests.performance.common.AbstractOpenEditorTestCase;
-
-public class OpenEditorTestCase extends AbstractOpenEditorTestCase {
- public static Test suite() {
- return new TestSuite(OpenEditorTestCase.class, "OpenEditorTestCase");
- }
-
- protected String getServerTypeId() {
- return "org.eclipse.jst.server.tomcat.50";
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.tests.performance/plugin.xml b/tests/org.eclipse.jst.server.tomcat.tests.performance/plugin.xml
deleted file mode 100644
index 7d959ab..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/plugin.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.tomcat.tests.performance"
- name="Server Tomcat Performance Plug-in"
- version="1.0.0"
- provider-name=""
- class="org.eclipse.jst.server.tomcat.tests.performance.PerformancePlugin">
-
- <runtime>
- <library name="performance.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.jdt.launching"/>
- <import plugin="org.eclipse.test.performance"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.jst.server.tomcat.core"/>
- <import plugin="org.eclipse.wst.server.tests.performance"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.server.tomcat.tests.performance/test.xml b/tests/org.eclipse.jst.server.tomcat.tests.performance/test.xml
deleted file mode 100644
index 32e4915..0000000
--- a/tests/org.eclipse.jst.server.tomcat.tests.performance/test.xml
+++ /dev/null
@@ -1,67 +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.jst.server.tomcat.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="extraVMargs" value="-Dorg.eclipse.jst.server.tomcat.50=${testDir}/${tomcat50Dir}"/>
-
- <property name="workspace" value="${eclipse-home}/workspace_servertomcat_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.jst.server.tomcat.*.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="ui-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.jst.server.tomcat.tests.performance.tomcat50.GetDelegateTestCase"/>
- <property name="extraVMargs" value="${extraVMargs}"/>
- </ant>
- <ant target="ui-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.jst.server.tomcat.tests.performance.tomcat50.OpenEditorTestCase"/>
- <property name="extraVMargs" value="${extraVMargs}"/>
- </ant>
- <ant target="ui-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.jst.server.tomcat.tests.performance.tomcat50.ServerActionsTestCase"/>
- <property name="extraVMargs" value="${extraVMargs}"/>
- </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.jst.server.tomcat.*.xml"/>
- <property name="output-file" value="${plugin-name}.xml"/>
- </ant>
- </target>
-
-</project>
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/.classpath b/tests/org.eclipse.jst.server.tomcat.ui.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.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.tomcat.ui.tests/.cvsignore b/tests/org.eclipse.jst.server.tomcat.ui.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/.project b/tests/org.eclipse.jst.server.tomcat.ui.tests/.project
deleted file mode 100644
index 43ba7b0..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.tomcat.ui.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.tomcat.ui.tests/build.properties b/tests/org.eclipse.jst.server.tomcat.ui.tests/build.properties
deleted file mode 100644
index 162192b..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2005 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- tests.jar
-src.includes = build.properties
-jars.compile.order = tests.jar
-source.tests.jar = src/
-output.tests.jar = bin/
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/plugin.xml b/tests/org.eclipse.jst.server.tomcat.ui.tests/plugin.xml
deleted file mode 100644
index beec2c3..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/plugin.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.tomcat.ui.tests"
- name="org.eclipse.jst.server.tomcat.ui.tests"
- version="1.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.jst.server.tomcat.ui.tests.TestsPlugin">
-
- <runtime>
- <library name="tests.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.wst.server.ui"/>
- <import plugin="org.eclipse.jst.server.tomcat.core"/>
- <import plugin="org.eclipse.jst.server.tomcat.ui"/>
- <import plugin="org.eclipse.wst.server.core.tests"/>
- <import plugin="org.eclipse.wst.server.ui.tests"/>
- <import plugin="org.eclipse.jst.server.tomcat.core.tests"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/AllTests.java b/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/AllTests.java
deleted file mode 100644
index 9d4680c..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/AllTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.ui.tests;
-
-import org.eclipse.jst.server.tomcat.core.tests.RuntimeLocation;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.server.tomcat.ui.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- String s = System.getProperty("tomcat50Dir");
- //s = "D:\\Tools\\tomcat\\jakarta-tomcat-3.2.4";
- if (s != null && s.length() > 0) {
- RuntimeLocation.runtimeLocation = s;
- suite.addTestSuite(OpenEditorTestCase.class);
- }
- suite.addTestSuite(DialogsTestCase.class);
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/DialogsTestCase.java b/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/DialogsTestCase.java
deleted file mode 100644
index 5101812..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/DialogsTestCase.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.ui.tests;
-
-import org.eclipse.jst.server.tomcat.ui.internal.editor.MimeMappingDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import junit.framework.TestCase;
-
-public class DialogsTestCase extends TestCase {
- private Shell getShell() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- public void testMimeMappingDialog() {
- MimeMappingDialog mmd = new MimeMappingDialog(getShell());
- UITestHelper.assertDialog(mmd);
- }
-
- /*public void testWebModuleDialog() {
- WebModuleDialog wmd = new WebModuleDialog(getShell(), null, null, null, true);
- UITestHelper.assertDialog(wmd);
- }*/
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/ExistenceTest.java b/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/ExistenceTest.java
deleted file mode 100644
index 004cee8..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/ExistenceTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.ui.tests;
-
-import org.eclipse.jst.server.tomcat.ui.internal.TomcatUIPlugin;
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(TomcatUIPlugin.getInstance());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/OpenEditorTestCase.java b/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/OpenEditorTestCase.java
deleted file mode 100644
index 1d118b2..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/OpenEditorTestCase.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.jst.server.tomcat.ui.tests;
-
-import org.eclipse.jst.server.tomcat.core.tests.Tomcat50ServerTestCase;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.tests.AbstractOpenEditorTestCase;
-
-public class OpenEditorTestCase extends AbstractOpenEditorTestCase {
- public IServer getServer() throws Exception {
- return new Tomcat50ServerTestCase().createServer();
- }
-
- public void releaseServer(IServer server) throws Exception {
- server.delete();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/OrderedTestSuite.java b/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/OrderedTestSuite.java
deleted file mode 100644
index 011616c..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.ui.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.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/TestsPlugin.java b/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/TestsPlugin.java
deleted file mode 100644
index 61ac53c..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.ui.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.jst.server.tomcat.ui.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.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/UITestHelper.java b/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/UITestHelper.java
deleted file mode 100644
index f817be6..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.tests/src/org/eclipse/jst/server/tomcat/ui/tests/UITestHelper.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.tomcat.ui.tests;
-
-import java.util.Iterator;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceNode;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.dialogs.PropertyDialog;
-import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
-import org.eclipse.ui.internal.dialogs.PropertyPageManager;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class UITestHelper extends TestCase {
- private static class PreferenceDialogWrapper extends PreferenceDialog {
- public PreferenceDialogWrapper(Shell parentShell, PreferenceManager manager) {
- super(parentShell, manager);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- private static class PropertyDialogWrapper extends PropertyDialog {
- public PropertyDialogWrapper(Shell parentShell, PreferenceManager manager, ISelection selection) {
- super(parentShell, manager, selection);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- protected static Shell getShell() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- public static PreferenceDialog getPreferenceDialog(String id) {
- PreferenceDialogWrapper dialog = null;
- PreferenceManager manager = WorkbenchPlugin.getDefault().getPreferenceManager();
- if (manager != null) {
- dialog = new PreferenceDialogWrapper(getShell(), manager);
- dialog.create();
-
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();)
- {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- }
- return dialog;
- }
-
- public static PropertyDialog getPropertyDialog(String id, IAdaptable element) {
- PropertyDialogWrapper dialog = null;
-
- PropertyPageManager manager = new PropertyPageManager();
- String title = "";
- String name = "";
-
- // load pages for the selection
- // fill the manager with contributions from the matching contributors
- PropertyPageContributorManager.getManager().contribute(manager, element);
-
- IWorkbenchAdapter adapter = (IWorkbenchAdapter)element.getAdapter(IWorkbenchAdapter.class);
- if (adapter != null) {
- name = adapter.getLabel(element);
- }
-
- // testing if there are pages in the manager
- Iterator pages = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- if (!pages.hasNext())
- return null;
-
- title = WorkbenchMessages.format("PropertyDialog.propertyMessage", new Object[] {name});
- dialog = new PropertyDialogWrapper(getShell(), manager, new StructuredSelection(element));
- dialog.create();
- dialog.getShell().setText(title);
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();) {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- return dialog;
- }
-
- /**
- * Automated test that checks all the labels and buttons of a dialog
- * to make sure there is enough room to display all the text. Any
- * text that wraps is only approximated and is currently not accurate.
- *
- * @param dialog the test dialog to be verified.
- */
- public static void assertDialog(Dialog dialog) {
- Assert.assertNotNull(dialog);
- dialog.setBlockOnOpen(false);
- dialog.open();
- Shell shell = dialog.getShell();
- verifyCompositeText(shell);
- dialog.close();
- }
-
- /*
- * Looks at all the child widgets of a given composite and
- * verifies the text on all labels and widgets.
- * @param composite The composite to look through
- */
- private static void verifyCompositeText(Composite composite) {
- Control children[] = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- try {
- //verify the text if the child is a button
- verifyButtonText((Button) children[i]);
- } catch (ClassCastException exNotButton) {
- try {
- //child is not a button, maybe a label
- verifyLabelText((Label) children[i]);
- } catch (ClassCastException exNotLabel) {
- try {
- //child is not a label, make a recursive call if it is a composite
- verifyCompositeText((Composite) children[i]);
- } catch (ClassCastException exNotComposite) {
- //the child is not a button, label, or composite - ignore it.
- }
- }
- }
- }
- }
-
- /*
- * Verifies that a given button is large enough to display its text.
- * @param button The button to verify,
- */
- private static void verifyButtonText(Button button) {
- String widget = button.toString();
- Point size = button.getSize();
-
- // compute the size with no line wrapping
- Point preferred = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(button.getText()); //check for '\n\'
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
-
- String message =
- new StringBuffer("Warning: ")
- .append(widget)
- .append("\n\tActual Width -> ")
- .append(size.x)
- .append("\n\tRecommended Width -> ")
- .append(preferred.x)
- .toString();
- if (preferred.x > size.x) {
- //close the dialog
- button.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Verifies that a given label is large enough to display its text.
- * @param label The label to verify,
- */
- private static void verifyLabelText(Label label) {
- String widget = label.toString();
- Point size = label.getSize();
-
- // compute the size with no line wrapping
- Point preferred = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(label.getText());
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
- String message = new StringBuffer("Warning: ").append(widget)
- .append("\n\tActual Width -> ").append(size.x)
- .append("\n\tRecommended Width -> ").append(preferred.x).toString();
- if (preferred.x > size.x) {
- //close the dialog
- label.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Counts the number of lines in a given String.
- * For example, if a string contains one (1) newline character,
- * a value of two (2) would be returned.
- * @param text The string to look through.
- * @return int the number of lines in text.
- */
- private static int countLines(String text) {
- int newLines = 1;
- for (int i = 0; i < text.length(); i++) {
- if (text.charAt(i) == '\n') {
- newLines++;
- }
- }
- return newLines;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.tomcat.ui.tests/test.xml b/tests/org.eclipse.jst.server.tomcat.ui.tests/test.xml
deleted file mode 100644
index b6bd153..0000000
--- a/tests/org.eclipse.jst.server.tomcat.ui.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.tomcat.ui.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="ui-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.jst.server.tomcat.ui.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.jst.server.ui.tests/.classpath b/tests/org.eclipse.jst.server.ui.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.jst.server.ui.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.ui.tests/.cvsignore b/tests/org.eclipse.jst.server.ui.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.jst.server.ui.tests/.project b/tests/org.eclipse.jst.server.ui.tests/.project
deleted file mode 100644
index 4ed7c37..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.server.ui.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.ui.tests/build.properties b/tests/org.eclipse.jst.server.ui.tests/build.properties
deleted file mode 100644
index 703c630..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- tests.jar
-src.includes = build.properties
-jars.compile.order = tests.jar
-source.tests.jar = src/
-output.tests.jar = bin/
diff --git a/tests/org.eclipse.jst.server.ui.tests/plugin.xml b/tests/org.eclipse.jst.server.ui.tests/plugin.xml
deleted file mode 100644
index 3a1b242..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.jst.server.ui.tests"
- name="org.eclipse.jst.server.ui.tests"
- version="1.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.jst.server.ui.tests.TestsPlugin">
-
- <runtime>
- <library name="tests.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.jst.server.ui"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/AllTests.java b/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/AllTests.java
deleted file mode 100644
index 53aae12..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/AllTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.ui.tests;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test for org.eclipse.jst.server.ui.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/ExistenceTest.java b/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/ExistenceTest.java
deleted file mode 100644
index 6906d8a..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/ExistenceTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.ui.tests;
-
-import org.eclipse.jst.server.ui.internal.JavaServerUIPlugin;
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(JavaServerUIPlugin.getInstance());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/OrderedTestSuite.java b/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/OrderedTestSuite.java
deleted file mode 100644
index 1295ca7..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.ui.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.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/TestsPlugin.java b/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/TestsPlugin.java
deleted file mode 100644
index c36ea3f..0000000
--- a/tests/org.eclipse.jst.server.ui.tests/src/org/eclipse/jst/server/ui/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.server.ui.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.jst.server.ui.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.jst.server.ui.tests/test.xml b/tests/org.eclipse.jst.server.ui.tests/test.xml
deleted file mode 100644
index c0cb61b..0000000
--- a/tests/org.eclipse.jst.server.ui.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.ui.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="ui-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.jst.server.ui.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.internet.monitor.core.tests/.classpath b/tests/org.eclipse.wst.internet.monitor.core.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.wst.internet.monitor.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.internet.monitor.core.tests/.cvsignore b/tests/org.eclipse.wst.internet.monitor.core.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/.project b/tests/org.eclipse.wst.internet.monitor.core.tests/.project
deleted file mode 100644
index 968a828..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.internet.monitor.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.internet.monitor.core.tests/build.properties b/tests/org.eclipse.wst.internet.monitor.core.tests/build.properties
deleted file mode 100644
index 535c477..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- monitortests.jar
-src.includes = test.xml,\
- build.properties
-jars.compile.order = monitortests.jar
-source.monitortests.jar = src/
-output.monitortests.jar = bin/
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/plugin.xml b/tests/org.eclipse.wst.internet.monitor.core.tests/plugin.xml
deleted file mode 100644
index 5296cc1..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/plugin.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.internet.monitor.core.tests"
- name="org.eclipse.wst.internet.monitor.core.tests"
- version="1.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.wst.internet.monitor.core.tests.TestsPlugin">
-
- <runtime>
- <library name="monitortests.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.wst.internet.monitor.core"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/AllTests.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/AllTests.java
deleted file mode 100644
index d492dee..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/AllTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests;
-
-import org.eclipse.wst.internet.monitor.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.wst.internet.monitor.core.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- suite.addTestSuite(ContentFiltersTestCase.class);
- suite.addTest(new OrderedTestSuite(MonitorTestCase.class));
- suite.addTest(new OrderedTestSuite(MonitorListenerTestCase.class));
- suite.addTest(new OrderedTestSuite(RequestTestCase.class));
-
- suite.addTest(new OrderedTestSuite(ContentFilterTestCase.class));
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/ContentFilterTestCase.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/ContentFilterTestCase.java
deleted file mode 100644
index 819c9f1..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/ContentFilterTestCase.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests;
-
-import org.eclipse.wst.internet.monitor.core.ContentFilterDelegate;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class ContentFilterTestCase extends TestCase {
- protected static ContentFilterDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(MonitorListenerTestCase.class, "MonitorTestCase");
- }
-
- public void test00Creation() {
- delegate = new TestContentFilterDelegate();
- }
-
- public void test01Filter() throws Exception {
- delegate.filter(null, false, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/ExistenceTest.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/ExistenceTest.java
deleted file mode 100644
index 2f5f43a..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/ExistenceTest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests;
-
-import org.eclipse.wst.internet.monitor.core.MonitorCore;
-
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(MonitorCore.getMonitors());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/MonitorListenerTestCase.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/MonitorListenerTestCase.java
deleted file mode 100644
index bd71ac4..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/MonitorListenerTestCase.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests;
-
-import org.eclipse.wst.internet.monitor.core.*;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class MonitorListenerTestCase extends TestCase {
- private static IMonitor monitor;
-
- protected static IMonitor addEvent;
- protected static IMonitor changeEvent;
- protected static IMonitor removeEvent;
- protected static int count;
-
- protected static IMonitorListener listener2;
-
- protected static IMonitorListener listener = new IMonitorListener() {
- public void monitorAdded(IMonitor monitor2) {
- addEvent = monitor2;
- count++;
- }
-
- public void monitorChanged(IMonitor monitor2) {
- changeEvent = monitor2;
- count++;
- }
-
- public void monitorRemoved(IMonitor monitor2) {
- removeEvent = monitor2;
- count++;
- }
- };
-
- public MonitorListenerTestCase() {
- super();
- }
-
- public static Test suite() {
- return new OrderedTestSuite(MonitorListenerTestCase.class, "MonitorListenerTestCase");
- }
-
- public void test0AddListener() throws Exception {
- MonitorCore.addMonitorListener(listener);
- }
-
- public void test1AddListener() throws Exception {
- MonitorCore.addMonitorListener(listener);
- }
-
- public void test2AddListener() throws Exception {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- monitor = wc.save();
-
- assertTrue(addEvent == monitor);
- assertTrue(changeEvent == null);
- assertTrue(removeEvent == null);
- assertTrue(count == 1);
- addEvent = null;
- count = 0;
- }
-
- public void test3ChangeListener() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(1);
- monitor = wc.save();
-
- assertTrue(addEvent == null);
- assertTrue(changeEvent == monitor);
- assertTrue(removeEvent == null);
- assertTrue(count == 1);
- changeEvent = null;
- count = 0;
- }
-
- public void test4RemoveListener() throws Exception {
- monitor.delete();
-
- assertTrue(addEvent == null);
- assertTrue(changeEvent == null);
- assertTrue(removeEvent == monitor);
- assertTrue(count == 1);
- removeEvent = null;
- count = 0;
- }
-
- public void test5RemoveListener() throws Exception {
- MonitorCore.removeMonitorListener(listener);
- }
-
- public void test6RemoveListener() throws Exception {
- MonitorCore.removeMonitorListener(listener);
- }
-
- public void test7CheckListener() throws Exception {
- listener2 = new IMonitorListener() {
- public void monitorAdded(IMonitor monitor2) {
- // ignore
- }
-
- public void monitorChanged(IMonitor monitor2) {
- // ignore
- }
-
- public void monitorRemoved(IMonitor monitor2) {
- // ignore
- }
- };
-
- listener2.monitorAdded(null);
- listener2.monitorChanged(null);
- listener2.monitorRemoved(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/MonitorTestCase.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/MonitorTestCase.java
deleted file mode 100644
index cd2f757..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/MonitorTestCase.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests;
-
-import org.eclipse.wst.internet.monitor.core.*;
-import junit.framework.Test;
-import junit.framework.TestCase;
-/**
- * Note: use ports between 22100-22200 to ensure they are free on the build machine.
- */
-public class MonitorTestCase extends TestCase {
- private static IMonitor monitor;
-
- public MonitorTestCase() {
- super();
- }
-
- public static Test suite() {
- return new OrderedTestSuite(MonitorListenerTestCase.class, "MonitorTestCase");
- }
-
- public void test00GetMonitors() throws Exception {
- assertNotNull(MonitorCore.getMonitors());
- }
-
- public void test01CreateMonitor() throws Exception {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- wc.setLocalPort(22150);
- wc.setRemoteHost("www.eclipse.org");
- wc.setRemotePort(80);
- monitor = wc.save();
-
- assertTrue(monitor != null);
- assertTrue(MonitorCore.getMonitors().length == 1);
- assertTrue(!monitor.isRunning());
- assertTrue(!monitor.isWorkingCopy());
- }
-
- public void test02GetMonitor() throws Exception {
- int count = 0;
- IMonitor[] monitors = MonitorCore.getMonitors();
- int size = monitors.length;
- for (int i = 0; i < size; i++) {
- if (monitor.equals(monitors[i]))
- count++;
- }
- assertTrue(count == 1);
- }
-
- public void test03StartMonitor() throws Exception {
- assertTrue(!monitor.isRunning());
- monitor.start();
- assertTrue(monitor.isRunning());
- }
-
- public void test04StartMonitor() throws Exception {
- assertTrue(monitor.isRunning());
- monitor.start();
- assertTrue(monitor.isRunning());
- }
-
- public void test05StartMonitor() throws Exception {
- try {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- wc.start();
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void test06StartMonitor() throws Exception {
- try {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- IMonitor m = wc.save();
- m.delete();
- m.start();
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void test07StopMonitor() throws Exception {
- assertTrue(monitor.isRunning());
- monitor.stop();
- assertTrue(!monitor.isRunning());
- }
-
- public void test08StopMonitor() throws Exception {
- assertTrue(!monitor.isRunning());
- monitor.stop();
- assertTrue(!monitor.isRunning());
- }
-
- public void test09RestartMonitor() throws Exception {
- assertTrue(!monitor.isRunning());
- monitor.start();
- assertTrue(monitor.isRunning());
- monitor.stop();
- assertTrue(!monitor.isRunning());
- }
-
- public void test10StopMonitor() throws Exception {
- try {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- wc.stop();
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void test11StopMonitor() throws Exception {
- try {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- IMonitor m = wc.save();
- m.delete();
- m.stop();
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void test12ValidateMonitor() throws Exception {
- assertTrue(monitor.validate().isOK());
- }
-
- public void test13ModifyMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(1);
- wc.setRemoteHost("a");
- wc.setRemotePort(2);
- IMonitor monitor2 = wc.save();
-
- assertTrue(monitor2 == monitor);
- assertTrue(monitor.getLocalPort() == 1);
- assertTrue(monitor.getRemoteHost().equals("a"));
- assertTrue(monitor.getRemotePort() == 2);
- }
-
- public void test14DeleteMonitor() throws Exception {
- monitor.delete();
- assertTrue(MonitorCore.getMonitors().length == 0);
- }
-
- public void test15DeleteMonitor() throws Exception {
- monitor.delete();
- }
-
- public void test16DeleteMonitor() throws Exception {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- wc.delete();
- }
-
- public void test17GetMonitor() throws Exception {
- int count = 0;
- IMonitor[] monitors = MonitorCore.getMonitors();
- int size = monitors.length;
- for (int i = 0; i < size; i++) {
- if (monitor.equals(monitors[i]))
- count++;
- }
- assertTrue(count == 0);
- }
-
- public void test18CreateMonitor() throws Exception {
- int num = MonitorCore.getMonitors().length;
- MonitorCore.createMonitor();
- assertTrue(MonitorCore.getMonitors().length == num);
- }
-
- public void test19CreateMonitor() {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- wc.setProtocol(null);
- assertNull(wc.getOriginal());
- }
-
- public void test20ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(-1);
- wc.setRemoteHost("www.eclipse.org");
- wc.setRemotePort(80);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test21ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(80);
- wc.setRemoteHost("www.eclipse.org");
- wc.setRemotePort(-1);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test22ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(8080);
- wc.setRemoteHost(null);
- wc.setRemotePort(80);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test23ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(8080);
- wc.setRemoteHost("");
- wc.setRemotePort(80);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test24ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(8080);
- wc.setRemoteHost(" ");
- wc.setRemotePort(80);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test25ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(8080);
- wc.setRemoteHost("hi&bye");
- wc.setRemotePort(80);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test26ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(8080);
- wc.setRemoteHost("xyz:");
- wc.setRemotePort(80);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test27ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(80);
- wc.setRemoteHost("www.eclipse.org");
- wc.setRemotePort(80);
- assertTrue(wc.validate().isOK());
- }
-
- public void test28ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(80);
- wc.setRemoteHost("localhost");
- wc.setRemotePort(80);
- assertTrue(!wc.validate().isOK());
- }
-
- public void test29ValidateMonitor() throws Exception {
- IMonitorWorkingCopy wc = monitor.createWorkingCopy();
- wc.setLocalPort(80);
- wc.setRemoteHost("localhost");
- wc.setRemotePort(80);
- IMonitor monitor2 = wc.save();
- try {
- monitor2.start();
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- monitor2.delete();
- }
-
- public void test30GetId() {
- monitor.getId();
- }
-
- public void test31GetProtocol() {
- assertNotNull(monitor.getProtocol());
- }
-
- public void test32CheckListener() throws Exception {
- IRequestListener listener2 = new IRequestListener() {
- public void requestAdded(IMonitor monitor2, Request request) {
- // ignore
- }
-
- public void requestChanged(IMonitor monitor2, Request request) {
- // ignore
- }
- };
-
- listener2.requestAdded(null, null);
- listener2.requestChanged(null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/OrderedTestSuite.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/OrderedTestSuite.java
deleted file mode 100644
index ee781b5..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.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.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/RequestTestCase.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/RequestTestCase.java
deleted file mode 100644
index a4aadc1..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/RequestTestCase.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests;
-
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import org.eclipse.wst.internet.monitor.core.*;
-import org.eclipse.wst.internet.monitor.core.internal.Monitor;
-import junit.framework.Test;
-import junit.framework.TestCase;
-/**
- * Note: use ports between 22100-22200 to ensure they are free on the build machine.
- */
-public class RequestTestCase extends TestCase {
- private static IMonitor monitor;
-
- protected static IMonitor monitorEvent;
- protected static Request requestEvent;
- protected static int addCount;
- protected static int changeCount;
-
- protected static IRequestListener listener = new IRequestListener() {
- public void requestAdded(IMonitor monitor2, Request request2) {
- monitorEvent = monitor2;
- requestEvent = request2;
- addCount++;
- }
-
- public void requestChanged(IMonitor monitor2, Request request2) {
- monitorEvent = monitor2;
- requestEvent = request2;
- changeCount++;
- }
- };
-
- class MyRequest extends Request {
- public MyRequest(Monitor monitor, String protocolId, int localPort, String remoteHost, int remotePort) {
- super(monitor, protocolId, localPort, remoteHost, remotePort);
- }
-
- public void testProtected() {
- super.setName("test");
- super.setRequest(null);
- super.setResponse(null);
- super.fireChangedEvent();
- }
- }
-
- public RequestTestCase() {
- super();
- }
-
- public static Test suite() {
- return new OrderedTestSuite(RequestTestCase.class, "RequestTestCase");
- }
-
- public void test00GetMonitors() throws Exception {
- assertNotNull(MonitorCore.getMonitors());
- }
-
- public void test01CreateMonitor() throws Exception {
- IMonitorWorkingCopy wc = MonitorCore.createMonitor();
- wc.setLocalPort(22152);
- wc.setRemoteHost("www.eclipse.org");
- wc.setRemotePort(80);
- monitor = wc.save();
-
- assertTrue(monitor != null);
- assertTrue(MonitorCore.getMonitors().length == 1);
- assertTrue(!monitor.isRunning());
- assertTrue(!monitor.isWorkingCopy());
- }
-
- public void test03AddListener() throws Exception {
- monitor.addRequestListener(listener);
- }
-
- public void test04AddListener() throws Exception {
- monitor.addRequestListener(listener);
- }
-
- public void test05StartMonitor() throws Exception {
- assertTrue(!monitor.isRunning());
- monitor.start();
- assertTrue(monitor.isRunning());
- }
-
- public void test06Ping() throws Exception {
- URL url = new URL("http://localhost:22152/");
- //URL url = new URL("http://www.eclipse.org/");
- HttpURLConnection conn = (HttpURLConnection) url.openConnection();
- conn.connect();
-
- // read the server's response
- System.out.println("Response from www.eclipse.org ----------------------------------");
- InputStream in = conn.getInputStream();
- byte[] b = new byte[256];
- int n = in.read(b);
- System.out.println(new String(b));
- while (n >= 0) {
- n = in.read(b);
- System.out.println(new String(b));
- }
- in.close();
- System.out.println("End of response from www.eclipse.org ---------------------------");
- }
-
- public void test07CheckListener() throws Exception {
- assertEquals(addCount, 1);
- assertEquals(monitorEvent, monitor);
- assertNotNull(requestEvent);
- }
-
- public void test08VerifyMonitor() throws Exception {
- assertEquals(requestEvent.getMonitor(), monitor);
- }
-
- public void test09VerifyProtocol() throws Exception {
- assertEquals(requestEvent.getProtocol(), "HTTP");
- }
-
- public void test10VerifyTime() throws Exception {
- // within a minute
- assertTrue(Math.abs(requestEvent.getDate().getTime() - System.currentTimeMillis()) < 1000 * 60);
- }
-
- public void test11VerifyLocalPort() throws Exception {
- assertEquals(requestEvent.getLocalPort(), 22152);
- }
-
- public void test12VerifyRemoteHost() throws Exception {
- assertEquals(requestEvent.getRemoteHost(), "www.eclipse.org");
- }
-
- public void test13VerifyRemotePort() throws Exception {
- assertEquals(requestEvent.getRemotePort(), 80);
- }
-
- public void test14VerifyRequest() throws Exception {
- assertNotNull(requestEvent.getRequest(Request.ALL));
- }
-
- public void test15VerifyResponse() throws Exception {
- assertNotNull(requestEvent.getResponse(Request.ALL));
- }
-
- public void test16VerifyResponseTime() throws Exception {
- assertTrue(requestEvent.getResponseTime() > 0);
- }
-
- public void test17CheckRequest() throws Exception {
- assertNotNull(requestEvent.getName());
- }
-
- public void test18CheckRequest() throws Exception {
- assertNull(requestEvent.getProperty("test"));
- }
-
- /*public void test19CheckRequest() throws Exception {
- assert(requestEvent.getProperty(""));
- }*/
-
- public void test19AddToRequest() throws Exception {
- requestEvent.addToRequest(new byte[0]);
- }
-
- public void test20AddToResponse() throws Exception {
- requestEvent.addToResponse(new byte[0]);
- }
-
- public void test21SetProperty() throws Exception {
- requestEvent.setProperty("test", null);
- }
-
- public void test22GetAdapter() throws Exception {
- assertNull(requestEvent.getAdapter(String.class));
- }
-
- public void test23StopMonitor() throws Exception {
- assertTrue(monitor.isRunning());
- monitor.stop();
- assertTrue(!monitor.isRunning());
- }
-
- public void test24RemoveListener() throws Exception {
- monitor.removeRequestListener(listener);
- }
-
- public void test25Create() {
- new Request(null, null, 0, null, 0);
- }
-
- public void test26TestProtectedMethods() {
- MyRequest mr = new MyRequest(null, null, 0, null, 0);
- mr.testProtected();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/TestContentFilterDelegate.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/TestContentFilterDelegate.java
deleted file mode 100644
index 9025fca..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/TestContentFilterDelegate.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests;
-
-import java.io.IOException;
-import org.eclipse.wst.internet.monitor.core.ContentFilterDelegate;
-import org.eclipse.wst.internet.monitor.core.Request;
-
-public class TestContentFilterDelegate extends ContentFilterDelegate{
- public byte[] filter(Request request, boolean isRequest, byte[] content) throws IOException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/TestsPlugin.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/TestsPlugin.java
deleted file mode 100644
index a9835b0..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.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.internet.monitor.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.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/extension/ContentFiltersTestCase.java b/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/extension/ContentFiltersTestCase.java
deleted file mode 100644
index c8a611e..0000000
--- a/tests/org.eclipse.wst.internet.monitor.core.tests/src/org/eclipse/wst/internet/monitor/core/tests/extension/ContentFiltersTestCase.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.core.tests.extension;
-
-import org.eclipse.wst.internet.monitor.core.internal.IContentFilter;
-import org.eclipse.wst.internet.monitor.core.internal.MonitorPlugin;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class ContentFiltersTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ContentFiltersTestCase.class, "ContentFiltersTestCase");
- }
-
- public void test1ContentFiltersExtension() throws Exception {
- IContentFilter[] cf = MonitorPlugin.getInstance().getContentFilters();
- if (cf != null) {
- int size = cf.length;
- for (int i = 0; i < size; i++)
- System.out.println(cf[i].getId() + " - " + cf[i].getName());
- }
- }
-
- public void test2ContentFiltersExtension() throws Exception {
- try {
- MonitorPlugin.getInstance().findContentFilter(null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void test3ContentFiltersExtension() throws Exception {
- IContentFilter cf = MonitorPlugin.getInstance().findContentFilter("abc.xyz");
- assertTrue(cf == null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.core.tests/test.xml b/tests/org.eclipse.wst.internet.monitor.core.tests/test.xml
deleted file mode 100644
index 68bae7d..0000000
--- a/tests/org.eclipse.wst.internet.monitor.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.internet.monitor.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.internet.monitor.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.internet.monitor.ui.tests/.classpath b/tests/org.eclipse.wst.internet.monitor.ui.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/.cvsignore b/tests/org.eclipse.wst.internet.monitor.ui.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/.project b/tests/org.eclipse.wst.internet.monitor.ui.tests/.project
deleted file mode 100644
index 5725113..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.internet.monitor.ui.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/build.properties b/tests/org.eclipse.wst.internet.monitor.ui.tests/build.properties
deleted file mode 100644
index 535c477..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- monitortests.jar
-src.includes = test.xml,\
- build.properties
-jars.compile.order = monitortests.jar
-source.monitortests.jar = src/
-output.monitortests.jar = bin/
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/plugin.xml b/tests/org.eclipse.wst.internet.monitor.ui.tests/plugin.xml
deleted file mode 100644
index e478114..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/plugin.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.internet.monitor.ui.tests"
- name="org.eclipse.wst.internet.monitor.ui.tests"
- version="1.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.wst.internet.monitor.ui.tests.TestsPlugin">
-
- <runtime>
- <library name="monitortests.jar">
- <export name="*"/>
- </library>
- </runtime>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.junit"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.wst.internet.monitor.core"/>
- <import plugin="org.eclipse.wst.internet.monitor.ui"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/AllTests.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/AllTests.java
deleted file mode 100644
index 2494c67..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/AllTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests;
-
-import org.eclipse.wst.internet.monitor.ui.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.wst.internet.monitor.ui.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- suite.addTestSuite(ContentViewersTestCase.class);
- suite.addTestSuite(MonitorUICoreTest.class);
-
- suite.addTestSuite(DialogsTestCase.class);
- suite.addTestSuite(PreferencesTestCase.class);
- suite.addTestSuite(ViewTestCase.class);
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/DialogsTestCase.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/DialogsTestCase.java
deleted file mode 100644
index 78440c9..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/DialogsTestCase.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests;
-
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.internet.monitor.ui.internal.MonitorDialog;
-import junit.framework.TestCase;
-
-public class DialogsTestCase extends TestCase {
- private Shell getShell() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- public void testMonitorDialog() {
- MonitorDialog td = new MonitorDialog(getShell());
- UITestHelper.assertDialog(td);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/ExistenceTest.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/ExistenceTest.java
deleted file mode 100644
index 5522735..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/ExistenceTest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests;
-
-import org.eclipse.wst.internet.monitor.ui.internal.MonitorUIPlugin;
-
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(MonitorUIPlugin.getInstance());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/MonitorUICoreTest.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/MonitorUICoreTest.java
deleted file mode 100644
index a845278..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/MonitorUICoreTest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests;
-
-import org.eclipse.wst.internet.monitor.ui.MonitorUICore;
-
-import junit.framework.TestCase;
-
-public class MonitorUICoreTest extends TestCase {
- public void testRequests() {
- assertNotNull(MonitorUICore.getRequests());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/OrderedTestSuite.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/OrderedTestSuite.java
deleted file mode 100644
index 8e7ecd6..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.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.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/PreferencesTestCase.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/PreferencesTestCase.java
deleted file mode 100644
index b5b12f9..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/PreferencesTestCase.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.jface.dialogs.Dialog;
-
-public class PreferencesTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(PreferencesTestCase.class);
- }
-
- public PreferencesTestCase(String name) {
- super(name);
- }
-
- public void testPreferencePage() {
- Dialog dialog = UITestHelper.getPreferenceDialog("org.eclipse.wst.internet.monitor.preferencePage");
- UITestHelper.assertDialog(dialog);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/TestsPlugin.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/TestsPlugin.java
deleted file mode 100644
index 1f97786..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.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.internet.monitor.ui.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.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/UITestHelper.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/UITestHelper.java
deleted file mode 100644
index 3c0e340..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/UITestHelper.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests;
-
-import java.util.Iterator;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceNode;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.dialogs.PropertyDialog;
-import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
-import org.eclipse.ui.internal.dialogs.PropertyPageManager;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class UITestHelper extends TestCase {
- private static class PreferenceDialogWrapper extends PreferenceDialog {
- public PreferenceDialogWrapper(Shell parentShell, PreferenceManager manager) {
- super(parentShell, manager);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- private static class PropertyDialogWrapper extends PropertyDialog {
- public PropertyDialogWrapper(Shell parentShell, PreferenceManager manager, ISelection selection) {
- super(parentShell, manager, selection);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- protected static Shell getShell() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- public static PreferenceDialog getPreferenceDialog(String id) {
- PreferenceDialogWrapper dialog = null;
- PreferenceManager manager = WorkbenchPlugin.getDefault().getPreferenceManager();
- if (manager != null) {
- dialog = new PreferenceDialogWrapper(getShell(), manager);
- dialog.create();
-
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();)
- {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- }
- return dialog;
- }
-
- public static PropertyDialog getPropertyDialog(String id, IAdaptable element) {
- PropertyDialogWrapper dialog = null;
-
- PropertyPageManager manager = new PropertyPageManager();
- String title = "";
- String name = "";
-
- // load pages for the selection
- // fill the manager with contributions from the matching contributors
- PropertyPageContributorManager.getManager().contribute(manager, element);
-
- IWorkbenchAdapter adapter = (IWorkbenchAdapter)element.getAdapter(IWorkbenchAdapter.class);
- if (adapter != null) {
- name = adapter.getLabel(element);
- }
-
- // testing if there are pages in the manager
- Iterator pages = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- if (!pages.hasNext())
- return null;
-
- title = WorkbenchMessages.format("PropertyDialog.propertyMessage", new Object[] {name});
- dialog = new PropertyDialogWrapper(getShell(), manager, new StructuredSelection(element));
- dialog.create();
- dialog.getShell().setText(title);
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();) {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- return dialog;
- }
-
- /**
- * Automated test that checks all the labels and buttons of a dialog
- * to make sure there is enough room to display all the text. Any
- * text that wraps is only approximated and is currently not accurate.
- *
- * @param dialog the test dialog to be verified.
- */
- public static void assertDialog(Dialog dialog) {
- Assert.assertNotNull(dialog);
- dialog.setBlockOnOpen(false);
- dialog.open();
- Shell shell = dialog.getShell();
- verifyCompositeText(shell);
- dialog.close();
- }
-
- /*
- * Looks at all the child widgets of a given composite and
- * verifies the text on all labels and widgets.
- * @param composite The composite to look through
- */
- private static void verifyCompositeText(Composite composite) {
- Control children[] = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- try {
- //verify the text if the child is a button
- verifyButtonText((Button) children[i]);
- } catch (ClassCastException exNotButton) {
- try {
- //child is not a button, maybe a label
- verifyLabelText((Label) children[i]);
- } catch (ClassCastException exNotLabel) {
- try {
- //child is not a label, make a recursive call if it is a composite
- verifyCompositeText((Composite) children[i]);
- } catch (ClassCastException exNotComposite) {
- //the child is not a button, label, or composite - ignore it.
- }
- }
- }
- }
- }
-
- /*
- * Verifies that a given button is large enough to display its text.
- * @param button The button to verify,
- */
- private static void verifyButtonText(Button button) {
- String widget = button.toString();
- Point size = button.getSize();
-
- // compute the size with no line wrapping
- Point preferred = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(button.getText()); //check for '\n\'
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
-
- String message =
- new StringBuffer("Warning: ")
- .append(widget)
- .append("\n\tActual Width -> ")
- .append(size.x)
- .append("\n\tRecommended Width -> ")
- .append(preferred.x)
- .toString();
- if (preferred.x > size.x) {
- //close the dialog
- button.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Verifies that a given label is large enough to display its text.
- * @param label The label to verify,
- */
- private static void verifyLabelText(Label label) {
- String widget = label.toString();
- Point size = label.getSize();
-
- // compute the size with no line wrapping
- Point preferred = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(label.getText());
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
- String message = new StringBuffer("Warning: ").append(widget)
- .append("\n\tActual Width -> ").append(size.x)
- .append("\n\tRecommended Width -> ").append(preferred.x).toString();
- if (preferred.x > size.x) {
- //close the dialog
- label.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Counts the number of lines in a given String.
- * For example, if a string contains one (1) newline character,
- * a value of two (2) would be returned.
- * @param text The string to look through.
- * @return int the number of lines in text.
- */
- private static int countLines(String text) {
- int newLines = 1;
- for (int i = 0; i < text.length(); i++) {
- if (text.charAt(i) == '\n') {
- newLines++;
- }
- }
- return newLines;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/ViewTestCase.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/ViewTestCase.java
deleted file mode 100644
index 4b90c6e..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/ViewTestCase.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests;
-
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import junit.framework.TestCase;
-
-public class ViewTestCase extends TestCase {
- public void testMonitorView() throws Exception {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IViewPart view = page.showView("org.eclipse.wst.internet.monitor.view");
- page.hideView(view);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/extension/ContentViewersTestCase.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/extension/ContentViewersTestCase.java
deleted file mode 100644
index 5da016e..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/extension/ContentViewersTestCase.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests.extension;
-
-import org.eclipse.wst.internet.monitor.ui.ContentViewer;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-public class ContentViewersTestCase extends TestCase {
- protected static ContentViewer viewer;
-
- public static Test suite() {
- return new TestSuite(ContentViewersTestCase.class, "ContentViewersTestCase");
- }
-
- public void test00Create() {
- viewer = new TestContentViewer();
- }
-
- public void test01GetContent() {
- viewer.getContent();
- }
-
- public void test02GetEditable() {
- viewer.getEditable();
- }
-
- public void test03SetContent() {
- viewer.setContent(null);
- }
-
- public void test04SetEditable() {
- viewer.setEditable(false);
- }
-
- public void test05Init() {
- viewer.init(null);
- }
-
- public void test06Dispose() {
- viewer.dispose();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/extension/TestContentViewer.java b/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/extension/TestContentViewer.java
deleted file mode 100644
index c0f790b..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.tests/src/org/eclipse/wst/internet/monitor/ui/tests/extension/TestContentViewer.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.internet.monitor.ui.tests.extension;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.internet.monitor.ui.ContentViewer;
-
-public class TestContentViewer extends ContentViewer {
- public void init(Composite parent) {
- // do nothing
- }
-
- public void setContent(byte[] b) {
- // do nothing
- }
-
- public byte[] getContent() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.internet.monitor.ui.tests/test.xml b/tests/org.eclipse.wst.internet.monitor.ui.tests/test.xml
deleted file mode 100644
index abc1288..0000000
--- a/tests/org.eclipse.wst.internet.monitor.ui.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.internet.monitor.ui.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="ui-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.internet.monitor.ui.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.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 1083964..0000000
--- a/tests/org.eclipse.wst.server.core.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-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 2aac862..0000000
--- a/tests/org.eclipse.wst.server.core.tests/plugin.xml
+++ /dev/null
@@ -1,24 +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="Eclipse.org"
- 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.eclipse.debug.core"/>
- <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 b376438..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/AllTests.java
+++ /dev/null
@@ -1,98 +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 Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-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 org.eclipse.wst.server.core.tests.model.*;
-import org.eclipse.wst.server.core.util.HTTPLaunchableTestCase;
-import org.eclipse.wst.server.core.util.NullModuleArtifactTestCase;
-import org.eclipse.wst.server.core.util.SocketUtilTestCase;
-import org.eclipse.wst.server.core.util.StaticWebTestCase;
-import org.eclipse.wst.server.core.util.WebResourceTestCase;
-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(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));
-
- suite.addTestSuite(IModuleTestCase.class);
- suite.addTestSuite(IModuleArtifactTestCase.class);
- suite.addTestSuite(IModuleTypeTestCase.class);
- suite.addTestSuite(ITaskTestCase.class);
- suite.addTestSuite(IOptionalTaskTestCase.class);
- suite.addTestSuite(TaskModelTestCase.class);
-
- suite.addTestSuite(RuntimeLifecycleListenerTestCase.class);
- suite.addTestSuite(ServerLifecycleListenerTestCase.class);
- suite.addTestSuite(ServerListenerTestCase.class);
- suite.addTestSuite(RuntimeLifecycleAdapterTestCase.class);
- suite.addTestSuite(ServerLifecycleAdapterTestCase.class);
- suite.addTestSuite(ServerAdapterTestCase.class);
-
- suite.addTest(new OrderedTestSuite(ClientDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(RuntimeLocatorDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ModuleDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(RuntimeTargetHandlersTestCase.class));
- suite.addTest(new OrderedTestSuite(RuntimeDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerBehaviourDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerTaskDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerLocatorDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ModuleFileTestCase.class));
- suite.addTest(new OrderedTestSuite(ModuleFolderTestCase.class));
- suite.addTest(new OrderedTestSuite(ModuleResourceTestCase.class));
-
- suite.addTest(new OrderedTestSuite(HTTPLaunchableTestCase.class));
- suite.addTest(new OrderedTestSuite(StaticWebTestCase.class));
- suite.addTest(new OrderedTestSuite(WebResourceTestCase.class));
- suite.addTest(new OrderedTestSuite(NullModuleArtifactTestCase.class));
- suite.addTestSuite(SocketUtilTestCase.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 755d3a6..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 Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-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/IModuleArtifactTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleArtifactTestCase.java
deleted file mode 100644
index ea758f3..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleArtifactTestCase.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleArtifact;
-
-import junit.framework.TestCase;
-
-public class IModuleArtifactTestCase extends TestCase {
- protected static IModuleArtifact artifact;
-
- public void testCreate() {
- artifact = new IModuleArtifact() {
- public IModule getModule() {
- return null;
- }
- };
-
- artifact.getModule();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleTestCase.java
deleted file mode 100644
index 809c2b5..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleTestCase.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.model.IModuleListener;
-
-import junit.framework.TestCase;
-
-public class IModuleTestCase extends TestCase {
- protected static IModule module;
-
- public void testCreate() {
- module = new IModule() {
- public String getId() {
- return null;
- }
-
- public String getName() {
- return null;
- }
-
- public IModuleType getModuleType() {
- return null;
- }
-
- public IProject getProject() {
- return null;
- }
-
- public void addModuleListener(IModuleListener listener) {
- // ignore
- }
-
- public void removeModuleListener(IModuleListener listener) {
- // ignore
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
- };
-
- module.getId();
- module.getName();
- module.getModuleType();
- module.getProject();
- module.addModuleListener(null);
- module.removeModuleListener(null);
- module.getAdapter(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleTypeTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleTypeTestCase.java
deleted file mode 100644
index e7df9f9..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IModuleTypeTestCase.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.IModuleType;
-
-import junit.framework.TestCase;
-
-public class IModuleTypeTestCase extends TestCase {
- protected static IModuleType type;
-
- public void testCreate() {
- type = new IModuleType() {
- public String getId() {
- return null;
- }
-
- public String getName() {
- return null;
- }
-
- public String getVersion() {
- return null;
- }
- };
-
- type.getId();
- type.getName();
- type.getVersion();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IOptionalTaskTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IOptionalTaskTestCase.java
deleted file mode 100644
index b2de071..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/IOptionalTaskTestCase.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IOptionalTask;
-import org.eclipse.wst.server.core.TaskModel;
-
-import junit.framework.TestCase;
-
-public class IOptionalTaskTestCase extends TestCase {
- protected static IOptionalTask task;
-
- public void testCreate() throws Exception {
- task = new IOptionalTask() {
- public String getName() {
- return null;
- }
-
- public String getDescription() {
- return null;
- }
-
- public TaskModel getTaskModel() {
- return null;
- }
-
- public void setTaskModel(TaskModel taskModel) {
- // ignore
- }
-
- public void execute(IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- public boolean canUndo() {
- return false;
- }
-
- public void undo() {
- // ignore
- }
-
- public int getStatus() {
- return 0;
- }
-
- public int getOrder() {
- return 0;
- }
- };
- task.getName();
- task.getDescription();
- task.getTaskModel();
- task.setTaskModel(null);
- task.execute(null);
- task.canUndo();
- task.undo();
- task.getStatus();
- task.getOrder();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ITaskTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ITaskTestCase.java
deleted file mode 100644
index 6655bb7..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ITaskTestCase.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.ITask;
-import org.eclipse.wst.server.core.TaskModel;
-
-import junit.framework.TestCase;
-
-public class ITaskTestCase extends TestCase {
- protected static ITask task;
-
- public void testCreate() throws Exception {
- task = new ITask() {
- public String getName() {
- return null;
- }
-
- public String getDescription() {
- return null;
- }
-
- public TaskModel getTaskModel() {
- return null;
- }
-
- public void setTaskModel(TaskModel taskModel) {
- // ignore
- }
-
- public void execute(IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- public boolean canUndo() {
- return false;
- }
-
- public void undo() {
- // ignore
- }
- };
- task.getName();
- task.getDescription();
- task.getTaskModel();
- task.setTaskModel(null);
- task.execute(null);
- task.canUndo();
- task.undo();
- }
-}
\ 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 73406cc..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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;
-
-public 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 6a7ca85..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ProjectPropertiesTestCase.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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.*;
-import org.eclipse.wst.server.core.internal.IProjectPropertiesListener;
-import org.eclipse.wst.server.core.internal.ProjectProperties;
-
-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, "AbstractServerTestCase");
- }
-
- 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 {
- ((ProjectProperties)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(((ProjectProperties) 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 {
- ProjectProperties pp = (ProjectProperties) props;
- pp.setServerProject(true, null);
- assertTrue(pp.isServerProject());
- }
-
- public void test11UnsetServerProject() throws Exception {
- ProjectProperties pp = (ProjectProperties) props;
- pp.setServerProject(false, null);
- assertFalse(pp.isServerProject());
- }
-
- public void test12TestListener() throws Exception {
- assertTrue(count == 0);
- }
-
- public void test13RemoveListener() throws Exception {
- ((ProjectProperties)props).removeProjectPropertiesListener(listener);
- }
-
- public void test14End() throws Exception {
- project.delete(true, true, null);
- }
-
- public void test15CheckListener() throws Exception {
- IProjectPropertiesListener listener2 = new IProjectPropertiesListener() {
- public void defaultServerChanged(IProject project2, IServer server) {
- // ignore
- }
-
- public void runtimeTargetChanged(IProject project2, IRuntime runtime) {
- // ignore
- }
- };
-
- listener2.defaultServerChanged(null, null);
- listener2.runtimeTargetChanged(null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/RuntimeLifecycleAdapterTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/RuntimeLifecycleAdapterTestCase.java
deleted file mode 100644
index 05b8e11..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/RuntimeLifecycleAdapterTestCase.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.util.RuntimeLifecycleAdapter;
-
-import junit.framework.TestCase;
-
-public class RuntimeLifecycleAdapterTestCase extends TestCase {
- public void testListener() {
- RuntimeLifecycleAdapter listener = new RuntimeLifecycleAdapter();
-
- listener.runtimeAdded(null);
- listener.runtimeChanged(null);
- listener.runtimeRemoved(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/RuntimeLifecycleListenerTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/RuntimeLifecycleListenerTestCase.java
deleted file mode 100644
index 9c970e5..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/RuntimeLifecycleListenerTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeLifecycleListener;
-
-import junit.framework.TestCase;
-
-public class RuntimeLifecycleListenerTestCase extends TestCase {
- public void testListener() {
- IRuntimeLifecycleListener listener = new IRuntimeLifecycleListener() {
- public void runtimeAdded(IRuntime runtime) {
- // ignore
- }
-
- public void runtimeChanged(IRuntime runtime) {
- // ignore
- }
-
- public void runtimeRemoved(IRuntime runtime) {
- // ignore
- }
- };
-
- listener.runtimeAdded(null);
- listener.runtimeChanged(null);
- listener.runtimeRemoved(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerAdapterTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerAdapterTestCase.java
deleted file mode 100644
index 42106b4..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerAdapterTestCase.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.util.ServerAdapter;
-
-import junit.framework.TestCase;
-
-public class ServerAdapterTestCase extends TestCase {
- public void testListener() {
- ServerAdapter listener = new ServerAdapter();
-
- listener.restartStateChange(null);
- listener.serverStateChange(null);
- listener.modulesChanged(null);
- listener.moduleStateChange(null, 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 c25d5f3..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerCoreTestCase.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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;
-import org.eclipse.wst.server.core.internal.ResourceManager;
-
-public class ServerCoreTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerCoreTestCase.class, "RuntimeLocatorDelegateTestCase");
- }
-
- 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 {
- ResourceManager.getInstance().getDefaultRuntime();
- }
-
- public void testFindRuntimeTargetHandlers0Extension() throws Exception {
- try {
- ServerCore.findRuntimeTargetHandler(null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testFindRuntimesTargetHandler1Extension() throws Exception {
- assertTrue(ServerCore.findRuntimeTargetHandler("x") == null);
- }
-
- public void testAddRuntimeLifecycleListener() {
- ServerCore.addRuntimeLifecycleListener(null);
- }
-
- public void testRemoveRuntimeLifecycleListener() {
- ServerCore.removeRuntimeLifecycleListener(null);
- }
-
- public void testAddServerLifecycleListener() {
- ServerCore.addServerLifecycleListener(null);
- }
-
- public void testRemoveServerLifecycleListener() {
- ServerCore.removeServerLifecycleListener(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerLifecycleAdapterTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerLifecycleAdapterTestCase.java
deleted file mode 100644
index 2f63915..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerLifecycleAdapterTestCase.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.util.ServerLifecycleAdapter;
-
-import junit.framework.TestCase;
-
-public class ServerLifecycleAdapterTestCase extends TestCase {
- public void testListener() {
- ServerLifecycleAdapter listener = new ServerLifecycleAdapter();
-
- listener.serverAdded(null);
- listener.serverChanged(null);
- listener.serverRemoved(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerLifecycleListenerTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerLifecycleListenerTestCase.java
deleted file mode 100644
index 592d7ad..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerLifecycleListenerTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerLifecycleListener;
-
-import junit.framework.TestCase;
-
-public class ServerLifecycleListenerTestCase extends TestCase {
- public void testListener() {
- IServerLifecycleListener listener = new IServerLifecycleListener() {
- public void serverAdded(IServer server) {
- // ignore
- }
-
- public void serverChanged(IServer server) {
- // ignore
- }
-
- public void serverRemoved(IServer server) {
- // ignore
- }
- };
-
- listener.serverAdded(null);
- listener.serverChanged(null);
- listener.serverRemoved(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerListenerTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerListenerTestCase.java
deleted file mode 100644
index ed98f7f..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerListenerTestCase.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerListener;
-
-import junit.framework.TestCase;
-
-public class ServerListenerTestCase extends TestCase {
- public void testListener() {
- IServerListener listener = new IServerListener() {
- public void restartStateChange(IServer server) {
- // ignore
- }
-
- public void serverStateChange(IServer server) {
- // ignore
- }
-
- public void modulesChanged(IServer server) {
- // ignore
- }
-
- public void moduleStateChange(IServer server, IModule[] module) {
- // ignore
- }
- };
-
- listener.restartStateChange(null);
- listener.serverStateChange(null);
- listener.modulesChanged(null);
- listener.moduleStateChange(null, null);
- }
-}
\ 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 d2e385e..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerPreferencesTestCase.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.internal.ServerPreferences;
-
-public class ServerPreferencesTestCase extends TestCase {
- protected static ServerPreferences prefs;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerPreferencesTestCase.class, "ServerPreferencesTestCase");
- }
-
- public void test00GetProperties() throws Exception {
- prefs = ServerPreferences.getInstance();
- }
-
- 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 be32ebe..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ServerUtilTestCase.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.server.core.IModuleType;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.ResourceManager;
-
-public class ServerUtilTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerUtilTestCase.class, "ServerUtilTestCase");
- }
-
- public void testFindServer0Extension() throws Exception {
- try {
- ResourceManager.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(ResourceManager.findServer(file) == null);
- }
-
- public void testGetModule1() throws Exception {
- try {
- ServerUtil.getModule(null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testGetModule2() throws Exception {
- ServerUtil.getModule("x");
- }
-
- public void testGetModules0() throws Exception {
- ServerUtil.getModules((IModuleType[]) null);
- }
-
- public void testGetModules1() throws Exception {
- ServerUtil.getModules((IProject) null);
- }
-
- public void testGetModules2() throws Exception {
- ServerUtil.getModules((String) null);
- }
-
- public void testIsSupportedModule0() throws Exception {
- try {
- ServerUtil.isSupportedModule((IModuleType) null, null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testIsSupportedModule1() throws Exception {
- ServerUtil.isSupportedModule((IModuleType[]) null, null);
- }
-
- public void testIsSupportedModule2() throws Exception {
- ServerUtil.isSupportedModule(null, null, null);
- }
-
- public void testModifyModules() throws Exception {
- try {
- ServerUtil.modifyModules(null, null, null, null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testSetServerDefaultName() throws Exception {
- try {
- ServerUtil.setServerDefaultName(null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testGetUnusedServerFile() throws Exception {
- try {
- ServerUtil.getUnusedServerFile(null, null);
- assertTrue("Should throw exception", false);
- } catch (Exception e) {
- // ignore
- }
- }
-
- public void testGetRuntimes() throws Exception {
- ServerUtil.getRuntimes(null, null);
- }
-
- public void testGetRuntimeTypes() throws Exception {
- ServerUtil.getRuntimeTypes(null, null, null);
- }
-
- public void testGetAvailableServersForModule() throws Exception {
- ServerUtil.getAvailableServersForModule(null, false, null);
- }
-
- public void testGetServersByModule() throws Exception {
- ServerUtil.getServersByModule(null, null);
- }
-
- public void testContainsModule() throws Exception {
- ServerUtil.containsModule(null, null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/TaskModelTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/TaskModelTestCase.java
deleted file mode 100644
index bb6fec1..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/TaskModelTestCase.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests;
-
-import org.eclipse.wst.server.core.TaskModel;
-
-import junit.framework.TestCase;
-
-public class TaskModelTestCase extends TestCase {
- protected static TaskModel taskModel;
-
- public void testCreate() {
- taskModel = new TaskModel();
- taskModel.getObject("test");
- taskModel.putObject("test", "test");
- }
-}
\ 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 8fa3ff5..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 Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-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/ext/AbstractRuntimeTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ext/AbstractRuntimeTestCase.java
deleted file mode 100644
index c981017..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ext/AbstractRuntimeTestCase.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.ext;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-/**
- * Abstract runtime test case. Use this harness to test a specific runtime.
- * All you have to do is extend this class, implement the abstract
- * method(s) and add the test case to your suite.
- * <p>
- * You are welcome to add type-specific tests to this method. The test
- * method numbers (i.e. the XX in testXX()) should be between 200 and 1000.
- * </p>
- */
-public abstract class AbstractRuntimeTestCase extends TestCase {
- protected static IProject project;
- protected static IProjectProperties props;
-
- protected static IRuntime runtime;
-
- public static Test suite() {
- return new OrderedTestSuite(AbstractRuntimeTestCase.class, "AbstractRuntimeTestCase");
- }
-
- protected IRuntime getRuntime() throws Exception {
- if (runtime == null)
- runtime = createRuntime();
-
- return runtime;
- }
-
- public abstract IRuntime createRuntime() throws Exception;
-
- public abstract void deleteRuntime(IRuntime runtime2) throws Exception;
-
- public void test0000GetProperties() 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 test0001GetRuntime() throws Exception {
- assertNull(props.getRuntimeTarget());
- }
-
- public void test0002SetRuntime() throws Exception {
- props.setRuntimeTarget(getRuntime(), null);
- assertEquals(props.getRuntimeTarget(), getRuntime());
- }
-
- public void test0003UnsetRuntime() throws Exception {
- props.setRuntimeTarget(null, null);
- assertNull(props.getRuntimeTarget());
- }
-
- public void test0004End() throws Exception {
- project.delete(true, true, null);
- }
-
- public void test0005Delegate() throws Exception {
- getRuntime().getAdapter(RuntimeDelegate.class);
- }
-
- public void test0006Validate() throws Exception {
- IStatus status = getRuntime().validate(null);
- assertTrue(status.isOK() || status.getSeverity() == IStatus.WARNING);
- }
-
- public void test0007Validate() throws Exception {
- IRuntimeWorkingCopy wc = getRuntime().createWorkingCopy();
- wc.setLocation(null);
- IStatus status = wc.validate(null);
- assertTrue(!status.isOK());
- }
-
- public void test0008ModifyRuntime() throws Exception {
- IRuntimeWorkingCopy wc = getRuntime().createWorkingCopy();
- wc.setName(wc.getName() + "x");
- wc.save(false, null);
- }
-
- /*public void test0009IsPrivate() throws Exception {
- getRuntime().isPrivate();
- }*/
-
- public void test0010IsReadOnly() throws Exception {
- getRuntime().isReadOnly();
- }
-
- public void test0011IsDelegateLoaded() throws Exception {
- getRuntime().isDelegateLoaded();
- }
-
- /*public void test0012GetTimestamp() throws Exception {
- getRuntime().getTimestamp();
- }*/
-
- public void test0013GetRuntimeType() throws Exception {
- assertNotNull(getRuntime().getRuntimeType());
- }
-
- public void test0014GetLocation() throws Exception {
- assertNotNull(getRuntime().getLocation());
- }
-
- public void test0015IsStub() throws Exception {
- getRuntime().isStub();
- }
-
- public void test1001Delete() throws Exception {
- deleteRuntime(getRuntime());
- runtime = null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ext/AbstractServerTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ext/AbstractServerTestCase.java
deleted file mode 100644
index 6b7ac58..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/ext/AbstractServerTestCase.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.ext;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.wst.server.core.*;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-/**
- * Abstract server test case. Use this harness to test a specific server.
- * All you have to do is extend this class, implement the abstract
- * method(s) and add the test case to your suite.
- * <p>
- * You are welcome to add type-specific tests to this method. The test
- * method numbers (i.e. the XX in testXX()) should be between 200 and 1000.
- * </p>
- */
-public abstract class AbstractServerTestCase extends TestCase {
- protected static IProject project;
- protected static IProjectProperties props;
-
- protected static IServer server;
-
- public static Test suite() {
- return new OrderedTestSuite(AbstractServerTestCase.class, "AbstractServerTestCase");
- }
-
- protected IServer getServer() throws Exception {
- if (server == null)
- server = createServer();
-
- return server;
- }
-
- public abstract IServer createServer() throws Exception;
-
- public abstract void deleteServer(IServer server2) throws Exception;
-
- public void test0000GetProperties() 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 test0001GetServer() throws Exception {
- assertNull(props.getDefaultServer());
- }
-
- public void test0002SetServer() throws Exception {
- props.setDefaultServer(getServer(), null);
- assertEquals(props.getDefaultServer(), getServer());
- }
-
- public void test0003UnSetServer() throws Exception {
- props.setDefaultServer(null, null);
- assertNull(props.getDefaultServer());
- }
-
- public void test0004End() throws Exception {
- project.delete(true, true, null);
- }
-
- public void test0005Delegate() throws Exception {
- getServer().getAdapter(ServerDelegate.class);
- }
-
- public void test0006Delegate() throws Exception {
- getServer().getAdapter(ServerBehaviourDelegate.class);
- }
-
- public void test0007Publish() throws Exception {
- getServer().publish(IServer.PUBLISH_FULL, null);
- }
-
- public void test0008CanRun() throws Exception {
- assertTrue(getServer().canStart(ILaunchManager.RUN_MODE).isOK());
- }
-
- public void test0009Run() throws Exception {
- getServer().synchronousStart(ILaunchManager.RUN_MODE, null);
- }
-
- public void test0010CanStop() throws Exception {
- assertTrue(getServer().canStop().isOK());
- }
-
- public void test0011Stop() throws Exception {
- getServer().synchronousStop(false);
- }
-
- public void test0012CanDebug() throws Exception {
- assertTrue(getServer().canStart(ILaunchManager.DEBUG_MODE).isOK());
- }
-
- public void test0013Debug() throws Exception {
- getServer().synchronousStart(ILaunchManager.DEBUG_MODE, null);
- }
-
- public void test0014CanStop() throws Exception {
- assertTrue(getServer().canStop().isOK());
- }
-
- public void test0015Stop() throws Exception {
- getServer().synchronousStop(false);
- }
-
- public void test0016GetServerPorts() throws Exception {
- IServerPort[] ports = getServer().getServerPorts();
- if (ports != null) {
- int size = ports.length;
- for (int i = 0; i < size; i++) {
- ports[i].getId();
- ports[i].getContentTypes();
- ports[i].getName();
- ports[i].getPort();
- ports[i].getProtocol();
- ports[i].isAdvanced();
- }
- }
- }
-
- public void test1001Delete() throws Exception {
- deleteServer(getServer());
- server = 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/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 2df12ae..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.internal.IClient;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-
-public class ClientsTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ClientsTestCase.class, "ClientsTestCase");
- }
-
- public void testClientsExtension() throws Exception {
- IClient[] clients = ServerPlugin.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 109bab8..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.internal.ILaunchableAdapter;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-
-public class LaunchableAdaptersTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(LaunchableAdaptersTestCase.class, "LaunchableAdaptersTestCase");
- }
-
- public void testLaunchableAdaptersExtension() throws Exception {
- ILaunchableAdapter[] la = ServerPlugin.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 eecfaf1..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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/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 eab5702..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeLocatorsTestCase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.internal.IRuntimeLocator;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-
-public class RuntimeLocatorsTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(RuntimeLocatorsTestCase.class, "RuntimeLocatorsTestCase");
- }
-
- public void testRuntimeLocatorsExtension() throws Exception {
- IRuntimeLocator[] runtimeLocators = ServerPlugin.getRuntimeLocators();
- if (runtimeLocators != null) {
- int size = runtimeLocators.length;
- for (int i = 0; i < size; i++) {
- System.out.println(runtimeLocators[i]);
- }
- }
- }
-}
\ 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 5483a75..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTargetHandlersTestCase.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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++) {
- rth[i].getId();
- rth[i].supportsRuntimeType(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/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 fc19605..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/extension/RuntimeTypesTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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++) {
- runtimeTypes[i].getId();
- runtimeTypes[i].getName();
- runtimeTypes[i].canCreate();
- runtimeTypes[i].getDescription();
- runtimeTypes[i].getVendor();
- runtimeTypes[i].getVersion();
- runtimeTypes[i].getModuleTypes();
- }
- }
- }
-}
\ 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 3c9ea0d..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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 7d1b65d..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.extension;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.wst.server.core.internal.IServerTask;
-import org.eclipse.wst.server.core.internal.ServerPlugin;
-
-public class ServerTasksTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(ServerTasksTestCase.class, "ServerTasksTestCase");
- }
-
- public void testServerTasksExtension() throws Exception {
- IServerTask[] serverTasks = ServerPlugin.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 6b0a983..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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 0c5787d..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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/src/org/eclipse/wst/server/core/tests/impl/TestClientDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestClientDelegate.java
deleted file mode 100644
index 81f3269..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestClientDelegate.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.ClientDelegate;
-
-public class TestClientDelegate extends ClientDelegate {
- public boolean supports(IServer server, Object launchable, String launchMode) {
- return false;
- }
-
- public IStatus launch(IServer server, Object launchable, String launchMode, ILaunch launch) {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestModuleDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestModuleDelegate.java
deleted file mode 100644
index ffdd9f8..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestModuleDelegate.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.IModuleResource;
-import org.eclipse.wst.server.core.model.ModuleDelegate;
-
-public class TestModuleDelegate extends ModuleDelegate{
- public IStatus validate() {
- return null;
- }
-
- public IModule[] getChildModules() {
- return null;
- }
-
- public IModuleResource[] members() throws CoreException {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestModuleResource.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestModuleResource.java
deleted file mode 100644
index 6e86891..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestModuleResource.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.wst.server.core.model.IModuleResource;
-
-public class TestModuleResource implements IModuleResource {
- public IPath getModuleRelativePath() {
- return null;
- }
-
- public String getName() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeDelegate.java
deleted file mode 100644
index 2f34fbd..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeDelegate.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-
-public class TestRuntimeDelegate extends RuntimeDelegate {
- // do nothing
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeLocatorDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeLocatorDelegate.java
deleted file mode 100644
index 26d4efd..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeLocatorDelegate.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.model.RuntimeLocatorDelegate;
-
-public class TestRuntimeLocatorDelegate extends RuntimeLocatorDelegate {
- public void searchForRuntimes(IPath path, IRuntimeSearchListener listener, IProgressMonitor monitor) {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeTargetHandlerDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeTargetHandlerDelegate.java
deleted file mode 100644
index c85655d..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestRuntimeTargetHandlerDelegate.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.model.RuntimeTargetHandlerDelegate;
-
-public class TestRuntimeTargetHandlerDelegate extends RuntimeTargetHandlerDelegate {
- public void setRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-
- public void removeRuntimeTarget(IProject project, IRuntime runtime, IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerBehaviourDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerBehaviourDelegate.java
deleted file mode 100644
index 818f6d0..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerBehaviourDelegate.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-
-public class TestServerBehaviourDelegate extends ServerBehaviourDelegate {
- public void publishServer(int kind, IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- public void publishModule(int kind, int deltaKind, IModule[] module, IProgressMonitor monitor) throws CoreException {
- // ignore
- }
-
- public void stop(boolean force) {
- // ignore
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerDelegate.java
deleted file mode 100644
index 9c8896f..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerDelegate.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-
-public class TestServerDelegate extends ServerDelegate {
- public IStatus canModifyModules(IModule[] add, IModule[] remove) {
- return null;
- }
-
- public IModule[] getChildModules(IModule[] module) {
- return null;
- }
-
- public IModule[] getRootModules(IModule module) throws CoreException {
- return null;
- }
-
- public void modifyModules(IModule[] add, IModule[] remove, IProgressMonitor monitor) throws CoreException {
- // do nothing
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerLocatorDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerLocatorDelegate.java
deleted file mode 100644
index d3c3d75..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerLocatorDelegate.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.model.ServerLocatorDelegate;
-
-public class TestServerLocatorDelegate extends ServerLocatorDelegate {
- public void searchForServers(String host, IServerSearchListener listener, IProgressMonitor monitor) {
- // ignore
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerTaskDelegate.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerTaskDelegate.java
deleted file mode 100644
index e7ddf3c..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestServerTaskDelegate.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import java.util.List;
-import org.eclipse.wst.server.core.IOptionalTask;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.ServerTaskDelegate;
-
-public class TestServerTaskDelegate extends ServerTaskDelegate {
- public IOptionalTask[] getTasks(IServer server, List modules) {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestStaticWeb.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestStaticWeb.java
deleted file mode 100644
index 3bf151b..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/impl/TestStaticWeb.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.impl;
-
-import org.eclipse.wst.server.core.util.IStaticWeb;
-
-public class TestStaticWeb implements IStaticWeb {
- public String getContextRoot() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ClientDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ClientDelegateTestCase.java
deleted file mode 100644
index ebba9a0..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ClientDelegateTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.model.ClientDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestClientDelegate;
-
-public class ClientDelegateTestCase extends TestCase {
- protected static ClientDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ClientDelegateTestCase.class, "ClientDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestClientDelegate();
- }
-
- public void test01Supports() throws Exception {
- delegate.supports(null, null, null);
- }
-
- public void test02Launch() throws Exception {
- delegate.launch(null, null, null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleDelegateTestCase.java
deleted file mode 100644
index f92e35a..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleDelegateTestCase.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.model.ModuleDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestModuleDelegate;
-
-public class ModuleDelegateTestCase extends TestCase {
- protected static ModuleDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ModuleDelegateTestCase.class, "ModuleDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestModuleDelegate();
- }
-
- public void test01Initialize() throws Exception {
- delegate.initialize();
- }
-
- public void test02Initialize() throws Exception {
- delegate.initialize(null);
- }
-
- public void test03GetChildModules() throws Exception {
- delegate.getChildModules();
- }
-
- public void test04GetModule() throws Exception {
- delegate.getModule();
- }
-
- public void test05Validate() throws Exception {
- delegate.validate();
- }
-
- public void test06Members() throws Exception {
- delegate.members();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleFileTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleFileTestCase.java
deleted file mode 100644
index bcbd19c..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleFileTestCase.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.internal.ModuleFile;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-
-public class ModuleFileTestCase extends TestCase {
- protected static ModuleFile delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ModuleFileTestCase.class, "ModuleFileTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new ModuleFile("name", null, 14);
- }
-
- public void test01Name() throws Exception {
- assertEquals(delegate.getName(), "name");
- }
-
- public void test02Path() throws Exception {
- assertNull(delegate.getModuleRelativePath());
- }
-
- public void test03Stamp() throws Exception {
- assertEquals(delegate.getModificationStamp(), 14);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleFolderTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleFolderTestCase.java
deleted file mode 100644
index 4353084..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleFolderTestCase.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.internal.ModuleFolder;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-
-public class ModuleFolderTestCase extends TestCase {
- protected static ModuleFolder delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ModuleFolderTestCase.class, "ModuleFolderTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new ModuleFolder("name", null);
- }
-
- public void test01Name() throws Exception {
- assertEquals(delegate.getName(), "name");
- }
-
- public void test02Path() throws Exception {
- assertNull(delegate.getModuleRelativePath());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleResourceTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleResourceTestCase.java
deleted file mode 100644
index 83a7a0f..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ModuleResourceTestCase.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestModuleResource;
-
-public class ModuleResourceTestCase extends TestCase {
- protected static TestModuleResource resource;
-
- public static Test suite() {
- return new OrderedTestSuite(ModuleResourceTestCase.class, "ModuleResourceTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- resource = new TestModuleResource();
- }
-
- public void test01Name() throws Exception {
- assertNull(resource.getName());
- }
-
- public void test02Path() throws Exception {
- assertNull(resource.getModuleRelativePath());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeDelegateTestCase.java
deleted file mode 100644
index 06073bd..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeDelegateTestCase.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.internal.Runtime;
-import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestRuntimeDelegate;
-
-public class RuntimeDelegateTestCase extends TestCase {
- protected static RuntimeDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(RuntimeDelegateTestCase.class, "RuntimeDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestRuntimeDelegate();
- }
-
- public void test01Initialize() throws Exception {
- delegate.initialize();
- }
-
- public void test02Initialize() throws Exception {
- delegate.initialize(new RuntimeWorkingCopy(new Runtime(null)));
- }
-
- public void test03GetRuntime() throws Exception {
- delegate.getRuntime();
- }
-
- public void test04GetRuntimeWorkingCopy() throws Exception {
- delegate.getRuntimeWorkingCopy();
- }
-
- public void test05Validate() throws Exception {
- delegate.validate();
- }
-
- public void test06GetAttribute() throws Exception {
- delegate.getAttribute("test", false);
- }
-
- public void test07GetAttribute() throws Exception {
- delegate.getAttribute("test", 0);
- }
-
- public void test08GetAttribute() throws Exception {
- delegate.getAttribute("test", new ArrayList());
- }
-
- public void test09GetAttribute() throws Exception {
- delegate.getAttribute("test", new HashMap());
- }
-
- public void test10GetAttribute() throws Exception {
- delegate.getAttribute("test", "test");
- }
-
- public void test11Dispose() throws Exception {
- delegate.dispose();
- }
-
- public void test12SetDefaults() throws Exception {
- delegate.setDefaults();
- }
-
- public void test13SetAttribute() throws Exception {
- delegate.setAttribute("test", false);
- }
-
- public void test14SetAttribute() throws Exception {
- delegate.setAttribute("test", 0);
- }
-
- public void test15SetAttribute() throws Exception {
- delegate.setAttribute("test", new ArrayList());
- }
-
- public void test16SetAttribute() throws Exception {
- delegate.setAttribute("test", new HashMap());
- }
-
- public void test17SetAttribute() throws Exception {
- delegate.setAttribute("test", "test");
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeLocatorDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeLocatorDelegateTestCase.java
deleted file mode 100644
index 451c6bd..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeLocatorDelegateTestCase.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.model.RuntimeLocatorDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestRuntimeLocatorDelegate;
-
-public class RuntimeLocatorDelegateTestCase extends TestCase {
- protected static RuntimeLocatorDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(RuntimeLocatorDelegateTestCase.class, "RuntimeLocatorDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestRuntimeLocatorDelegate();
- }
-
- public void test01Search() throws Exception {
- delegate.searchForRuntimes(null, null, null);
- }
-
- public void test02Listener() {
- RuntimeLocatorDelegate.IRuntimeSearchListener listener = new RuntimeLocatorDelegate.IRuntimeSearchListener() {
- public void runtimeFound(IRuntimeWorkingCopy runtime) {
- // ignore
- }
- };
-
- listener.runtimeFound(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeTargetHandlerDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeTargetHandlerDelegateTestCase.java
deleted file mode 100644
index a26f72e..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/RuntimeTargetHandlerDelegateTestCase.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.model.RuntimeTargetHandlerDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestRuntimeTargetHandlerDelegate;
-
-public class RuntimeTargetHandlerDelegateTestCase extends TestCase {
- protected static RuntimeTargetHandlerDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(RuntimeTargetHandlerDelegateTestCase.class, "RuntimeTargetHandlerDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestRuntimeTargetHandlerDelegate();
- }
-
- public void test01Initialize() throws Exception {
- delegate.initialize(null);
- }
-
- public void test02GetRuntimeTargetHandler() throws Exception {
- delegate.getRuntimeTargetHandler();
- }
-
- public void test03SetRuntimeTarget() throws Exception {
- delegate.setRuntimeTarget(null, null, null);
- }
-
- public void test04RemoveRuntimeTarget() throws Exception {
- delegate.removeRuntimeTarget(null, null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerBehaviourDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerBehaviourDelegateTestCase.java
deleted file mode 100644
index a5fcf39..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerBehaviourDelegateTestCase.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestServerBehaviourDelegate;
-
-public class ServerBehaviourDelegateTestCase extends TestCase {
- protected static ServerBehaviourDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerBehaviourDelegateTestCase.class, "ServerBehaviourDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestServerBehaviourDelegate();
- }
-
- public void test01Initialize() throws Exception {
- delegate.initialize();
- }
-
- public void test02Initialize() throws Exception {
- delegate.initialize(new ServerWorkingCopy(new Server(null)));
- }
-
- public void test03GetServer() throws Exception {
- delegate.getServer();
- }
-
- public void test04Dispose() throws Exception {
- delegate.dispose();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerDelegateTestCase.java
deleted file mode 100644
index 5541b0b..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerDelegateTestCase.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestServerDelegate;
-
-public class ServerDelegateTestCase extends TestCase {
- protected static ServerDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerDelegateTestCase.class, "ServerDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestServerDelegate();
- }
-
- public void test01Initialize() throws Exception {
- delegate.initialize();
- }
-
- public void test02Initialize() throws Exception {
- delegate.initialize(new ServerWorkingCopy(new Server(null)));
- }
-
- public void test03GetServer() throws Exception {
- delegate.getServer();
- }
-
- public void test04GetServerWorkingCopy() throws Exception {
- delegate.getServerWorkingCopy();
- }
-
- public void test06GetAttribute() throws Exception {
- delegate.getAttribute("test", false);
- }
-
- public void test07GetAttribute() throws Exception {
- delegate.getAttribute("test", 0);
- }
-
- public void test08GetAttribute() throws Exception {
- delegate.getAttribute("test", new ArrayList());
- }
-
- public void test09GetAttribute() throws Exception {
- delegate.getAttribute("test", new HashMap());
- }
-
- public void test10GetAttribute() throws Exception {
- delegate.getAttribute("test", "test");
- }
-
- public void test11Dispose() throws Exception {
- delegate.dispose();
- }
-
- public void test12SetDefaults() throws Exception {
- delegate.setDefaults();
- }
-
- public void test13SetAttribute() throws Exception {
- delegate.setAttribute("test", false);
- }
-
- public void test14SetAttribute() throws Exception {
- delegate.setAttribute("test", 0);
- }
-
- public void test15SetAttribute() throws Exception {
- delegate.setAttribute("test", new ArrayList());
- }
-
- public void test16SetAttribute() throws Exception {
- delegate.setAttribute("test", new HashMap());
- }
-
- public void test17SetAttribute() throws Exception {
- delegate.setAttribute("test", "test");
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerLocatorDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerLocatorDelegateTestCase.java
deleted file mode 100644
index a7d8db0..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerLocatorDelegateTestCase.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.model.ServerLocatorDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestServerLocatorDelegate;
-
-public class ServerLocatorDelegateTestCase extends TestCase {
- protected static ServerLocatorDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerLocatorDelegateTestCase.class, "ServerLocatorDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestServerLocatorDelegate();
- }
-
- public void test01Search() throws Exception {
- delegate.searchForServers("host", null, null);
- }
-
- public void test02Listener() {
- ServerLocatorDelegate.IServerSearchListener listener = new ServerLocatorDelegate.IServerSearchListener() {
- public void serverFound(IServerWorkingCopy server) {
- // ignore
- }
- };
-
- listener.serverFound(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerTaskDelegateTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerTaskDelegateTestCase.java
deleted file mode 100644
index 5e50430..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/tests/model/ServerTaskDelegateTestCase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.tests.model;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.core.model.ServerTaskDelegate;
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestServerTaskDelegate;
-
-public class ServerTaskDelegateTestCase extends TestCase {
- protected static ServerTaskDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerTaskDelegateTestCase.class, "ServerTaskDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestServerTaskDelegate();
- }
-
- public void test01GetTasks() throws Exception {
- delegate.getTasks(null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/HTTPLaunchableTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/HTTPLaunchableTestCase.java
deleted file mode 100644
index 37bec20..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/HTTPLaunchableTestCase.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class HTTPLaunchableTestCase extends TestCase {
- protected static HttpLaunchable launch;
-
- public static Test suite() {
- return new OrderedTestSuite(HTTPLaunchableTestCase.class, "HTTPLaunchableTestCase");
- }
-
- public void test00Create() {
- launch = new HttpLaunchable(null);
- }
-
- public void test01GetURL() {
- assertNull(launch.getURL());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/NullModuleArtifactTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/NullModuleArtifactTestCase.java
deleted file mode 100644
index 278f99e..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/NullModuleArtifactTestCase.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class NullModuleArtifactTestCase extends TestCase {
- protected static NullModuleArtifact nma;
-
- public static Test suite() {
- return new OrderedTestSuite(NullModuleArtifactTestCase.class, "NullModuleArtifactTestCase");
- }
-
- public void test00Create() {
- nma = new NullModuleArtifact(null);
- }
-
- public void test01GetModule() {
- assertNull(nma.getModule());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/SocketUtilTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/SocketUtilTestCase.java
deleted file mode 100644
index 61c36f4..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/SocketUtilTestCase.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.util.SocketUtil;
-
-import junit.framework.TestCase;
-
-public class SocketUtilTestCase extends TestCase {
- public void testFindUnusedPort() {
- int i = SocketUtil.findUnusedPort(22000, 22050);
- assertTrue(i != -1);
- }
-
- public void testIsLocalhost() {
- assertTrue(SocketUtil.isLocalhost("localhost"));
- }
-
- public void testIsLocalhost2() {
- assertTrue(SocketUtil.isLocalhost("127.0.0.1"));
- }
-
- public void testIsLocalhost3() {
- assertFalse(SocketUtil.isLocalhost(null));
- }
-
- public void testIsLocalhost4() {
- assertFalse(SocketUtil.isLocalhost("www.not-eclipse.com"));
- }
-
- public void testIsPortInUse() {
- assertFalse(SocketUtil.isPortInUse(22054));
- }
-
- public void testIsPortInUse2() {
- assertFalse(SocketUtil.isPortInUse(22054, 5));
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/StaticWebTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/StaticWebTestCase.java
deleted file mode 100644
index dbef978..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/StaticWebTestCase.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import org.eclipse.wst.server.core.tests.impl.TestStaticWeb;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class StaticWebTestCase extends TestCase {
- protected static TestStaticWeb web;
-
- public static Test suite() {
- return new OrderedTestSuite(StaticWebTestCase.class, "StaticWebTestCase");
- }
-
- public void test00Create() {
- web = new TestStaticWeb();
- }
-
- public void test01GetContextRoot() {
- assertNull(web.getContextRoot());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/WebResourceTestCase.java b/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/WebResourceTestCase.java
deleted file mode 100644
index 62531c5..0000000
--- a/tests/org.eclipse.wst.server.core.tests/src/org/eclipse/wst/server/core/util/WebResourceTestCase.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.core.util;
-
-import org.eclipse.wst.server.core.tests.OrderedTestSuite;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class WebResourceTestCase extends TestCase {
- protected static WebResource web;
-
- public static Test suite() {
- return new OrderedTestSuite(WebResourceTestCase.class, "WebResourceTestCase");
- }
-
- public void test00Create() {
- web = new WebResource(null, null);
- }
-
- public void test01GetModule() {
- assertNull(web.getModule());
- }
-
- public void test02GetPath() {
- assertNull(web.getPath());
- }
-
- public void test03ToString() {
- web.toString();
- }
-}
\ 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 cd3cb89..0000000
--- a/tests/org.eclipse.wst.server.tests.performance/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-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 4e4fa98..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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 e2dc117..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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 266a8b8..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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 225d4e1..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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 904bc50..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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 e0705ed..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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/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 1da0863..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, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.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.setReadOnly(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 fa9d859..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="org.eclipse.wst.server.tests.performance"
- version="1.0.0"
- provider-name="Eclipse.org"
- 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>
diff --git a/tests/org.eclipse.wst.server.ui.tests/.classpath b/tests/org.eclipse.wst.server.ui.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.wst.server.ui.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.ui.tests/.cvsignore b/tests/org.eclipse.wst.server.ui.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.wst.server.ui.tests/.project b/tests/org.eclipse.wst.server.ui.tests/.project
deleted file mode 100644
index bc1b2ee..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.server.ui.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.ui.tests/build.properties b/tests/org.eclipse.wst.server.ui.tests/build.properties
deleted file mode 100644
index 703c630..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- tests.jar
-src.includes = build.properties
-jars.compile.order = tests.jar
-source.tests.jar = src/
-output.tests.jar = bin/
diff --git a/tests/org.eclipse.wst.server.ui.tests/plugin.xml b/tests/org.eclipse.wst.server.ui.tests/plugin.xml
deleted file mode 100644
index d936029..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/plugin.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin
- id="org.eclipse.wst.server.ui.tests"
- name="org.eclipse.wst.server.ui.tests"
- version="1.0.0"
- provider-name="Eclipse.org"
- class="org.eclipse.wst.server.ui.tests.TestsPlugin">
-
- <runtime>
- <library name="tests.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.ui"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.wst.server.ui"/>
- </requires>
-
-</plugin>
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/AbstractOpenEditorTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/AbstractOpenEditorTestCase.java
deleted file mode 100644
index 5066344..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/AbstractOpenEditorTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- **********************************************************************/
-package org.eclipse.wst.server.ui.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-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 TestCase {
- private final String SERVER_EDITOR_ID = "org.eclipse.wst.server.ui.tests.editor";
-
- public static Test suite() {
- return new TestSuite(AbstractOpenEditorTestCase.class, "OpenEditorTestCase");
- }
-
- public void testOpenEditor() throws Exception {
- IServer server = getServer();
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = page.openEditor(new ServerEditorInput(server.getId()), SERVER_EDITOR_ID, true);
- page.closeEditor(editor, false);
- releaseServer(server);
- }
-
- public abstract IServer getServer() throws Exception;
-
- public abstract void releaseServer(IServer server) throws Exception;
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/AllTests.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/AllTests.java
deleted file mode 100644
index 58a3f3e..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/AllTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests;
-
-import org.eclipse.wst.server.ui.tests.dialog.DialogsTestCase;
-import org.eclipse.wst.server.ui.tests.dialog.PreferencesTestCase;
-import org.eclipse.wst.server.ui.tests.dialog.ViewTestCase;
-import org.eclipse.wst.server.ui.tests.editor.*;
-import org.eclipse.wst.server.ui.tests.wizard.IWizardHandleTestCase;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-public class AllTests {
- public static Test suite() {
- TestSuite suite = new TestSuite("Test suite for org.eclipse.wst.server.ui.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- suite.addTestSuite(ServerUIPreferencesTestCase.class);
-
- suite.addTestSuite(ServerUICoreTestCase.class);
- suite.addTestSuite(ServerUIUtilTestCase.class);
-
- suite.addTest(new OrderedTestSuite(ICommandManagerTestCase.class));
- suite.addTest(new OrderedTestSuite(IServerEditorPartInputTestCase.class));
- suite.addTest(new OrderedTestSuite(IServerEditorSectionTestCase.class));
-
- suite.addTestSuite(DialogsTestCase.class);
- suite.addTestSuite(PreferencesTestCase.class);
- suite.addTestSuite(ViewTestCase.class);
-
- suite.addTest(new OrderedTestSuite(IOrderedTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerEditorActionFactoryDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerEditorPageSectionFactoryDelegateTestCase.class));
- suite.addTest(new OrderedTestSuite(ServerEditorPartFactoryDelegateTestCase.class));
-
- suite.addTestSuite(IWizardHandleTestCase.class);
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ExistenceTest.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ExistenceTest.java
deleted file mode 100644
index 5240758..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ExistenceTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests;
-
-import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- assertNotNull(ServerUIPlugin.getInstance());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/OrderedTestSuite.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/OrderedTestSuite.java
deleted file mode 100644
index 7b6eda0..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.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;
-
-public 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.ui.tests/src/org/eclipse/wst/server/ui/tests/ScanAction.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ScanAction.java
deleted file mode 100644
index a4563d7..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ScanAction.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.*;
-/**
- * Test to scan plugins for missing properties.
- */
-public class ScanAction extends TestCase {
- /**
- * ScanAction constructor comment.
- */
- public ScanAction() {
- super();
- }
-
- /* (non-Javadoc)
- *
- */
- public void testIt() {
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- if (projects != null) {
- int size = projects.length;
- for (int i = 0; i < size; i++) {
- scanProject(projects[i]);
- }
- }
- }
-
- protected void scanProject(IProject project) {
- System.out.println("************************************");
- System.out.println("Project: " + project.getName());
-
- IFile file = project.getFile("plugin.properties");
- if (!file.exists()) {
- System.out.println(" plugin.properties not found");
- return;
- }
-
- //System.out.print(" Reading plugin.properties...");
- Properties props = new Properties();
- InputStream in = null;
- try {
- in = file.getContents();
- props.load(in);
- } catch (Exception e) {
- e.printStackTrace();
- return;
- } finally {
- try {
- in.close();
- } catch (Exception e) {
- // ignore
- }
- }
- //System.out.println(props.size() + " found");
-
- List propsFound = new ArrayList();
- List newProps = new ArrayList();
-
- scanContainer(project, props, propsFound, newProps);
-
- System.out.println("Unused properties:");
- if (props.size() == propsFound.size())
- System.out.println(" None");
- else {
- Iterator iterator = props.keySet().iterator();
- while (iterator.hasNext()) {
- String s = (String) iterator.next();
- if (!propsFound.contains(s))
- System.out.println(" " + s);
- }
- }
-
- System.out.println("New properties:");
- if (newProps.size() == 0)
- System.out.println(" None");
- else {
- Iterator iterator = newProps.iterator();
- while (iterator.hasNext()) {
- String s = (String) iterator.next();
- System.out.println(" " + s);
- }
- }
- }
-
- protected void scanContainer(IContainer container, Properties props, List propsFound, List newProps) {
- if (container == null || !container.exists())
- return;
-
- try {
- IResource[] resources = container.members();
- if (resources != null) {
- int size = resources.length;
- for (int i = 0; i < size; i++) {
- if (resources[i] instanceof IFile) {
- String[] found = scanFile((IFile) resources[i]);
- if (found != null) {
- int size2 = found.length;
- for (int j = 0; j < size2; j++) {
- if (props.containsKey(found[j])) {
- if (!propsFound.contains(found[j]))
- propsFound.add(found[j]);
- } else
- newProps.add(found[j]);
- }
- }
- } else if (resources[i] instanceof IContainer) {
- scanContainer((IContainer) resources[i], props, propsFound, newProps);
- }
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Scan a java file and return all of the "%xxx" found.
- * @param file
- * @return
- */
- protected String[] scanFile(IFile file) {
- if (file == null || !file.exists())
- return new String[0];
-
- if (!file.getName().endsWith("java") && !file.getName().endsWith("xml"))
- return new String[0];
-
- //System.out.println(" File: " + file.getName());
- List list = new ArrayList();
- BufferedReader br = null;
- try {
- br = new BufferedReader(new InputStreamReader(file.getContents()));
-
- String line = br.readLine();
- while (line != null) {
- int index = line.indexOf("%");
- while (index >= 0) {
- int end = line.indexOf("\"", index + 1);
- if (end >= 0) {
- String s = line.substring(index + 1, end);
- //System.out.println(" Found '" + s + "'");
- list.add(s);
- }
- index = line.indexOf("%", index + 1);
- }
- line = br.readLine();
- }
- } catch (Exception e) {
- e.printStackTrace();
- return new String[0];
- }
-
- String[] s = new String[list.size()];
- list.toArray(s);
- return s;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUICoreTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUICoreTestCase.java
deleted file mode 100644
index 5eb8582..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUICoreTestCase.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests;
-
-import org.eclipse.wst.server.ui.ServerUICore;
-import junit.framework.TestCase;
-
-public class ServerUICoreTestCase extends TestCase {
- public void testLabelProvider() {
- assertNotNull(ServerUICore.getLabelProvider());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUIPreferencesTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUIPreferencesTestCase.java
deleted file mode 100644
index 2a5e725..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUIPreferencesTestCase.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
-import org.eclipse.wst.server.ui.internal.ServerUIPreferences;
-
-public class ServerUIPreferencesTestCase extends TestCase {
- protected static ServerUIPreferences prefs;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerUIPreferencesTestCase.class, "ServerUIPreferencesTestCase");
- }
-
- public void test00GetProperties() throws Exception {
- prefs = ServerUIPlugin.getPreferences();
- }
-
- public void test01GetPref() throws Exception {
- prefs.getPromptBeforeIrreversibleChange();
- }
-
- public void test02GetPref() throws Exception {
- prefs.getSaveEditors();
- }
-
- public void test03SetPref() throws Exception {
- prefs.setPromptBeforeIrreversibleChange(false);
- assertFalse(prefs.getPromptBeforeIrreversibleChange());
- }
-
- public void test04SetPref() throws Exception {
- prefs.setPromptBeforeIrreversibleChange(true);
- assertTrue(prefs.getPromptBeforeIrreversibleChange());
- }
-
- public void test05SetPref() throws Exception {
- prefs.setSaveEditors(ServerUIPreferences.SAVE_EDITORS_AUTO);
- assertEquals(prefs.getSaveEditors(), ServerUIPreferences.SAVE_EDITORS_AUTO);
- }
-
- public void test06SetPref() throws Exception {
- prefs.setSaveEditors(ServerUIPreferences.SAVE_EDITORS_NEVER);
- assertEquals(prefs.getSaveEditors(), ServerUIPreferences.SAVE_EDITORS_NEVER);
- }
-
- public void test07SetPref() throws Exception {
- prefs.setSaveEditors(ServerUIPreferences.SAVE_EDITORS_PROMPT);
- assertEquals(prefs.getSaveEditors(), ServerUIPreferences.SAVE_EDITORS_PROMPT);
- }
-
- public void test08DefaultPref() throws Exception {
- prefs.setPromptBeforeIrreversibleChange(prefs.getDefaultPromptBeforeIrreversibleChange());
- assertEquals(prefs.getPromptBeforeIrreversibleChange(), prefs.getDefaultPromptBeforeIrreversibleChange());
- }
-
- public void test09DefaultPref() throws Exception {
- prefs.setSaveEditors(prefs.getDefaultSaveEditors());
- assertEquals(prefs.getSaveEditors(), prefs.getDefaultSaveEditors());
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUIUtilTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUIUtilTestCase.java
deleted file mode 100644
index 6b67600..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/ServerUIUtilTestCase.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests;
-
-import junit.framework.TestCase;
-
-public class ServerUIUtilTestCase extends TestCase {
- public void testShowNewRuntimeWizard() {
- //ServerUIUtil.showNewRuntimeWizard(null, null, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/TestsPlugin.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/TestsPlugin.java
deleted file mode 100644
index 32754f0..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.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.ui.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.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/DialogsTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/DialogsTestCase.java
deleted file mode 100644
index 18d341a..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/DialogsTestCase.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.dialog;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.internal.DeleteServerDialog;
-import org.eclipse.wst.server.ui.internal.TerminationDialog;
-import junit.framework.TestCase;
-
-public class DialogsTestCase extends TestCase {
- private Shell getShell() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- public void testDeleteServerDialog() {
- DeleteServerDialog dsd = new DeleteServerDialog(getShell(), new IServer[0], new IFolder[0]);
- UITestHelper.assertDialog(dsd);
- }
-
- public void testTerminationDialog() {
- TerminationDialog td = new TerminationDialog(getShell(), "MyServer with a really long name");
- UITestHelper.assertDialog(td);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/PreferencesTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/PreferencesTestCase.java
deleted file mode 100644
index 4fbdcf7..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/PreferencesTestCase.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.dialog;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-
-import org.eclipse.jface.dialogs.Dialog;
-
-public class PreferencesTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(PreferencesTestCase.class);
- }
-
- public PreferencesTestCase(String name) {
- super(name);
- }
-
- public void testServerPreferencePage() {
- Dialog dialog = UITestHelper.getPreferenceDialog("org.eclipse.wst.server.ui.preferencePage");
- UITestHelper.assertDialog(dialog);
- }
-
- public void testRuntimePreferencePage() {
- Dialog dialog = UITestHelper.getPreferenceDialog("org.eclipse.wst.server.ui.runtime.preferencePage");
- UITestHelper.assertDialog(dialog);
- }
-
- public void testServerPropertyPage() throws Exception {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("PropertyTest");
- project.create(null);
- project.open(null);
-
- Dialog dialog = UITestHelper.getPropertyDialog("org.eclipse.wst.server.ui.project.properties", project);
- UITestHelper.assertDialog(dialog);
-
- project.delete(true, true, null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/UITestHelper.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/UITestHelper.java
deleted file mode 100644
index 257c310..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/UITestHelper.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.dialog;
-
-import java.util.Iterator;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceNode;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.dialogs.PropertyDialog;
-import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
-import org.eclipse.ui.internal.dialogs.PropertyPageManager;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class UITestHelper extends TestCase {
- private static class PreferenceDialogWrapper extends PreferenceDialog {
- public PreferenceDialogWrapper(Shell parentShell, PreferenceManager manager) {
- super(parentShell, manager);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- private static class PropertyDialogWrapper extends PropertyDialog {
- public PropertyDialogWrapper(Shell parentShell, PreferenceManager manager, ISelection selection) {
- super(parentShell, manager, selection);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- protected static Shell getShell() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- public static PreferenceDialog getPreferenceDialog(String id) {
- PreferenceDialogWrapper dialog = null;
- PreferenceManager manager = WorkbenchPlugin.getDefault().getPreferenceManager();
- if (manager != null) {
- dialog = new PreferenceDialogWrapper(getShell(), manager);
- dialog.create();
-
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();)
- {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- }
- return dialog;
- }
-
- public static PropertyDialog getPropertyDialog(String id, IAdaptable element) {
- PropertyDialogWrapper dialog = null;
-
- PropertyPageManager manager = new PropertyPageManager();
- String title = "";
- String name = "";
-
- // load pages for the selection
- // fill the manager with contributions from the matching contributors
- PropertyPageContributorManager.getManager().contribute(manager, element);
-
- IWorkbenchAdapter adapter = (IWorkbenchAdapter)element.getAdapter(IWorkbenchAdapter.class);
- if (adapter != null) {
- name = adapter.getLabel(element);
- }
-
- // testing if there are pages in the manager
- Iterator pages = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- if (!pages.hasNext())
- return null;
-
- title = WorkbenchMessages.format("PropertyDialog.propertyMessage", new Object[] {name});
- dialog = new PropertyDialogWrapper(getShell(), manager, new StructuredSelection(element));
- dialog.create();
- dialog.getShell().setText(title);
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();) {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- return dialog;
- }
-
- /**
- * Automated test that checks all the labels and buttons of a dialog
- * to make sure there is enough room to display all the text. Any
- * text that wraps is only approximated and is currently not accurate.
- *
- * @param dialog the test dialog to be verified.
- */
- public static void assertDialog(Dialog dialog) {
- Assert.assertNotNull(dialog);
- dialog.setBlockOnOpen(false);
- dialog.open();
- Shell shell = dialog.getShell();
- verifyCompositeText(shell);
- dialog.close();
- }
-
- /*
- * Looks at all the child widgets of a given composite and
- * verifies the text on all labels and widgets.
- * @param composite The composite to look through
- */
- private static void verifyCompositeText(Composite composite) {
- Control children[] = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- try {
- //verify the text if the child is a button
- verifyButtonText((Button) children[i]);
- } catch (ClassCastException exNotButton) {
- try {
- //child is not a button, maybe a label
- verifyLabelText((Label) children[i]);
- } catch (ClassCastException exNotLabel) {
- try {
- //child is not a label, make a recursive call if it is a composite
- verifyCompositeText((Composite) children[i]);
- } catch (ClassCastException exNotComposite) {
- //the child is not a button, label, or composite - ignore it.
- }
- }
- }
- }
- }
-
- /*
- * Verifies that a given button is large enough to display its text.
- * @param button The button to verify,
- */
- private static void verifyButtonText(Button button) {
- String widget = button.toString();
- Point size = button.getSize();
-
- // compute the size with no line wrapping
- Point preferred = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(button.getText()); //check for '\n\'
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
-
- String message =
- new StringBuffer("Warning: ")
- .append(widget)
- .append("\n\tActual Width -> ")
- .append(size.x)
- .append("\n\tRecommended Width -> ")
- .append(preferred.x)
- .toString();
- if (preferred.x > size.x) {
- //close the dialog
- button.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Verifies that a given label is large enough to display its text.
- * @param label The label to verify,
- */
- private static void verifyLabelText(Label label) {
- String widget = label.toString();
- Point size = label.getSize();
-
- // compute the size with no line wrapping
- Point preferred = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(label.getText());
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
- String message = new StringBuffer("Warning: ").append(widget)
- .append("\n\tActual Width -> ").append(size.x)
- .append("\n\tRecommended Width -> ").append(preferred.x).toString();
- if (preferred.x > size.x) {
- //close the dialog
- label.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Counts the number of lines in a given String.
- * For example, if a string contains one (1) newline character,
- * a value of two (2) would be returned.
- * @param text The string to look through.
- * @return int the number of lines in text.
- */
- private static int countLines(String text) {
- int newLines = 1;
- for (int i = 0; i < text.length(); i++) {
- if (text.charAt(i) == '\n') {
- newLines++;
- }
- }
- return newLines;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/ViewTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/ViewTestCase.java
deleted file mode 100644
index b37470c..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/dialog/ViewTestCase.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.dialog;
-
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import junit.framework.TestCase;
-
-public class ViewTestCase extends TestCase {
- public void testServerView() throws Exception {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IViewPart view = page.showView("org.eclipse.wst.server.ui.ServersView");
- page.hideView(view);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ICommandManagerTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ICommandManagerTestCase.java
deleted file mode 100644
index 61eaa88..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ICommandManagerTestCase.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.editor;
-
-import org.eclipse.wst.server.ui.editor.ICommandManager;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestCommandManager;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class ICommandManagerTestCase extends TestCase {
- protected static ICommandManager commandManager;
-
- public static Test suite() {
- return new OrderedTestSuite(ICommandManagerTestCase.class, "ICommandManagerTestCase");
- }
-
- public void test00Create() {
- commandManager = new TestCommandManager();
- }
-
- public void test01Execute() {
- commandManager.executeCommand(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IOrderedTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IOrderedTestCase.java
deleted file mode 100644
index 7348be3..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IOrderedTestCase.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.editor;
-
-import org.eclipse.wst.server.ui.editor.IOrdered;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestOrdered;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class IOrderedTestCase extends TestCase {
- protected static IOrdered ordered;
-
- public static Test suite() {
- return new OrderedTestSuite(IOrderedTestCase.class, "IOrderedTestCase");
- }
-
- public void test00Create() {
- ordered = new TestOrdered();
- }
-
- public void test01GetOrder() {
- ordered.getOrder();
- }
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IServerEditorPartInputTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IServerEditorPartInputTestCase.java
deleted file mode 100644
index 480ce29..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IServerEditorPartInputTestCase.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.editor;
-
-import org.eclipse.wst.server.ui.editor.IServerEditorPartInput;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestServerEditorPartInput;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class IServerEditorPartInputTestCase extends TestCase {
- protected static IServerEditorPartInput input;
-
- public static Test suite() {
- return new OrderedTestSuite(IServerEditorPartInputTestCase.class, "IServerEditorPartInputTestCase");
- }
-
- public void test00Create() {
- input = new TestServerEditorPartInput();
- }
-
- public void test01Execute() {
- input.getServer();
- }
-
- public void test02IsServerReadOnly() {
- input.isServerReadOnly();
- }
-
- public void test03GetCommandManager() {
- input.getServerCommandManager();
- }
-
- public void test04Exists() {
- input.exists();
- }
-
- public void test05GetImageDescriptor() {
- input.getImageDescriptor();
- }
-
- public void test06GetName() {
- input.getName();
- }
-
- public void test07GetPersistable() {
- input.getPersistable();
- }
-
- public void test08GetToolTipText() {
- input.getToolTipText();
- }
-
- public void test09GetAdapter() {
- input.getAdapter(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IServerEditorSectionTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IServerEditorSectionTestCase.java
deleted file mode 100644
index 4c9b44d..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/IServerEditorSectionTestCase.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.editor;
-
-import org.eclipse.wst.server.ui.editor.IServerEditorSection;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestServerEditorSection;
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class IServerEditorSectionTestCase extends TestCase {
- protected static IServerEditorSection section;
-
- public static Test suite() {
- return new OrderedTestSuite(IServerEditorSectionTestCase.class, "IServerEditorSectionTestCase");
- }
-
- public void test00Create() {
- section = new TestServerEditorSection();
- }
-
- public void test01Init() {
- section.init(null, null);
- }
-
- public void test02CreateSection() {
- section.createSection(null);
- }
-
- public void test03Dispose() {
- section.dispose();
- }
-
- public void test04GetErrorMessage() {
- section.getErrorMessage();
- }
-
- public void test05GetSaveStatus() {
- section.getSaveStatus();
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorActionFactoryDelegateTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorActionFactoryDelegateTestCase.java
deleted file mode 100644
index f26c8d7..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorActionFactoryDelegateTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.editor;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.ui.editor.ServerEditorActionFactoryDelegate;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestServerEditorActionFactoryDelegate;
-
-public class ServerEditorActionFactoryDelegateTestCase extends TestCase {
- protected static ServerEditorActionFactoryDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerEditorActionFactoryDelegateTestCase.class, "ServerEditorActionFactoryDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestServerEditorActionFactoryDelegate();
- }
-
- public void test01ShouldDisplay() throws Exception {
- delegate.shouldDisplay(null);
- }
-
- public void test02CreateAction() throws Exception {
- delegate.createAction(null, null);
- }
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorPageSectionFactoryDelegateTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorPageSectionFactoryDelegateTestCase.java
deleted file mode 100644
index 3a2becb..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorPageSectionFactoryDelegateTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.editor;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.ui.editor.ServerEditorPageSectionFactoryDelegate;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestServerEditorPageSectionFactoryDelegate;
-
-public class ServerEditorPageSectionFactoryDelegateTestCase extends TestCase {
- protected static ServerEditorPageSectionFactoryDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerEditorPageSectionFactoryDelegateTestCase.class, "ServerEditorPageSectionFactoryDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestServerEditorPageSectionFactoryDelegate();
- }
-
- public void test01ShouldCreateSection() throws Exception {
- delegate.shouldCreateSection(null);
- }
-
- public void test02CreateSection() throws Exception {
- delegate.createSection();
- }
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorPartFactoryDelegateTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorPartFactoryDelegateTestCase.java
deleted file mode 100644
index 8cdabc4..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/editor/ServerEditorPartFactoryDelegateTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.editor;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-import org.eclipse.wst.server.ui.editor.ServerEditorPartFactoryDelegate;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestServerEditorPartFactoryDelegate;
-
-public class ServerEditorPartFactoryDelegateTestCase extends TestCase {
- protected static ServerEditorPartFactoryDelegate delegate;
-
- public static Test suite() {
- return new OrderedTestSuite(ServerEditorPartFactoryDelegateTestCase.class, "ServerEditorPartFactoryDelegateTestCase");
- }
-
- public void test00CreateDelegate() throws Exception {
- delegate = new TestServerEditorPartFactoryDelegate();
- }
-
- public void test01ShouldCreatePage() throws Exception {
- delegate.shouldCreatePage(null);
- }
-
- public void test02CreatePage() throws Exception {
- delegate.createPage();
- }
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestCommandManager.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestCommandManager.java
deleted file mode 100644
index 11aeae1..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestCommandManager.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import org.eclipse.wst.server.core.ITask;
-import org.eclipse.wst.server.ui.editor.ICommandManager;
-
-public class TestCommandManager implements ICommandManager {
- public void executeCommand(ITask task) {
- // ignore
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestOrdered.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestOrdered.java
deleted file mode 100644
index 1306168..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestOrdered.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import org.eclipse.wst.server.ui.editor.IOrdered;
-
-public class TestOrdered implements IOrdered {
-
- public int getOrder() {
- return 0;
- }
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorActionFactoryDelegate.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorActionFactoryDelegate.java
deleted file mode 100644
index 83e3583..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorActionFactoryDelegate.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.wst.server.ui.editor.IServerEditorPartInput;
-import org.eclipse.wst.server.ui.editor.ServerEditorActionFactoryDelegate;
-
-public class TestServerEditorActionFactoryDelegate extends ServerEditorActionFactoryDelegate {
-
- public IAction createAction(IEditorSite site, IServerEditorPartInput input) {
- return null;
- }
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPageSectionFactoryDelegate.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPageSectionFactoryDelegate.java
deleted file mode 100644
index 363a380..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPageSectionFactoryDelegate.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import org.eclipse.wst.server.ui.editor.IServerEditorSection;
-import org.eclipse.wst.server.ui.editor.ServerEditorPageSectionFactoryDelegate;
-
-public class TestServerEditorPageSectionFactoryDelegate extends ServerEditorPageSectionFactoryDelegate {
-
- public IServerEditorSection createSection() {
- return null;
- }
-
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPartFactoryDelegate.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPartFactoryDelegate.java
deleted file mode 100644
index ba257c9..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPartFactoryDelegate.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.wst.server.ui.editor.ServerEditorPartFactoryDelegate;
-
-public class TestServerEditorPartFactoryDelegate extends ServerEditorPartFactoryDelegate {
-
- public IEditorPart createPage() {
- return null;
- }
-
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPartInput.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPartInput.java
deleted file mode 100644
index d500efc..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorPartInput.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.ui.editor.ICommandManager;
-import org.eclipse.wst.server.ui.editor.IServerEditorPartInput;
-
-public class TestServerEditorPartInput implements IServerEditorPartInput{
- public IServerWorkingCopy getServer() {
- return null;
- }
-
- public boolean isServerReadOnly() {
- return false;
- }
-
- public ICommandManager getServerCommandManager() {
- return null;
- }
-
- public boolean exists() {
- return false;
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return null;
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return null;
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorSection.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorSection.java
deleted file mode 100644
index fab6dbf..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestServerEditorSection.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.wst.server.ui.editor.IServerEditorSection;
-
-public class TestServerEditorSection implements IServerEditorSection{
- public void init(IEditorSite site, IEditorInput input) {
- // ignore
- }
-
- public void createSection(Composite parent) {
- // ignore
- }
-
- public void dispose() {
- // ignore
- }
-
- public String getErrorMessage() {
- return null;
- }
-
- public IStatus[] getSaveStatus() {
- return null;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestWizardHandle.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestWizardHandle.java
deleted file mode 100644
index a688192..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/impl/TestWizardHandle.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.impl;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-
-public class TestWizardHandle implements IWizardHandle {
- private String message = null;
- private int messageType = IMessageProvider.NONE;
-
- public void update() {
- // ignore
- }
-
- public void setTitle(String title) {
- // ignore
- }
-
- public void setDescription(String desc) {
- // ignore
- }
-
- public void setImageDescriptor(ImageDescriptor image) {
- // ignore
- }
-
- public void setMessage(String newMessage, int newType) {
- message = newMessage;
- messageType = newType;
- }
-
- public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InterruptedException, InvocationTargetException {
- // ignore
- }
-
- public String getMessage() {
- return message;
- }
-
- public int getMessageType() {
- return messageType;
- }
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/wizard/IWizardHandleTestCase.java b/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/wizard/IWizardHandleTestCase.java
deleted file mode 100644
index 6f6060e..0000000
--- a/tests/org.eclipse.wst.server.ui.tests/src/org/eclipse/wst/server/ui/tests/wizard/IWizardHandleTestCase.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.ui.tests.wizard;
-
-import org.eclipse.jface.dialogs.IMessageProvider;
-import org.eclipse.wst.server.ui.tests.OrderedTestSuite;
-import org.eclipse.wst.server.ui.tests.impl.TestWizardHandle;
-import org.eclipse.wst.server.ui.wizard.IWizardHandle;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-
-public class IWizardHandleTestCase extends TestCase {
- protected static IWizardHandle wizardHandle;
- private final String sampleMessage = "Sample message";
- private final int sampleMessageType = IMessageProvider.ERROR;
-
- public static Test suite() {
- return new OrderedTestSuite(IWizardHandleTestCase.class, "IWizardHandleTestCase");
- }
-
- public void test00Create() {
- wizardHandle = new TestWizardHandle();
- }
-
- public void test01Run() throws Exception {
- wizardHandle.run(true, true, null);
- }
-
- public void test02SetDescription() {
- wizardHandle.setDescription(null);
- }
-
- public void test03SetImageDescriptor() {
- wizardHandle.setImageDescriptor(null);
- }
-
- public void test04SetMessage() {
- wizardHandle.setMessage(sampleMessage, sampleMessageType);
- }
-
- public void test05SetTitle() {
- wizardHandle.setTitle(null);
- }
-
- public void test06Update() {
- wizardHandle.update();
- }
-
- public void test07GetMessage() {
- assertEquals(sampleMessage, wizardHandle.getMessage());
- }
-
- public void test08GetMessageType() {
- assertEquals(sampleMessageType, wizardHandle.getMessageType());
- }
-
-
-}
diff --git a/tests/org.eclipse.wst.server.ui.tests/test.xml b/tests/org.eclipse.wst.server.ui.tests/test.xml
deleted file mode 100644
index f57c5c8..0000000
--- a/tests/org.eclipse.wst.server.ui.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.ui.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="ui-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.ui.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.util.tests/.classpath b/tests/org.eclipse.wst.server.util.tests/.classpath
deleted file mode 100644
index 065ac06..0000000
--- a/tests/org.eclipse.wst.server.util.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.util.tests/.cvsignore b/tests/org.eclipse.wst.server.util.tests/.cvsignore
deleted file mode 100644
index ba077a4..0000000
--- a/tests/org.eclipse.wst.server.util.tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/tests/org.eclipse.wst.server.util.tests/.project b/tests/org.eclipse.wst.server.util.tests/.project
deleted file mode 100644
index be26a53..0000000
--- a/tests/org.eclipse.wst.server.util.tests/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.wst.server.util.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.util.tests/build.properties b/tests/org.eclipse.wst.server.util.tests/build.properties
deleted file mode 100644
index 703c630..0000000
--- a/tests/org.eclipse.wst.server.util.tests/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# Copyright (c) 2003, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- test.xml,\
- tests.jar
-src.includes = build.properties
-jars.compile.order = tests.jar
-source.tests.jar = src/
-output.tests.jar = bin/
diff --git a/tests/org.eclipse.wst.server.util.tests/plugin.xml b/tests/org.eclipse.wst.server.util.tests/plugin.xml
deleted file mode 100644
index 2657aae..0000000
--- a/tests/org.eclipse.wst.server.util.tests/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.util.tests"
- name="org.eclipse.wst.server.util.tests"
- version="1.0.0"
- provider-name="IBM"
- class="org.eclipse.wst.server.util.tests.TestsPlugin">
-
- <runtime>
- <library name="tests.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.ui"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.wst.server.ui"/>
- <import plugin="org.eclipse.wst.server.util"/>
- </requires>
-
-</plugin>
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/AllTests.java b/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/AllTests.java
deleted file mode 100644
index 337a39a..0000000
--- a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/AllTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.util.tests;
-
-import org.eclipse.wst.server.util.tests.dialog.PreferencesTestCase;
-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.util.tests");
- //$JUnit-BEGIN$
- suite.addTestSuite(ExistenceTest.class);
- suite.addTestSuite(PreferencesTestCase.class);
- //$JUnit-END$
- return suite;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/ExistenceTest.java b/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/ExistenceTest.java
deleted file mode 100644
index 7afeac3..0000000
--- a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/ExistenceTest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.util.tests;
-
-import org.eclipse.wst.server.util.internal.audio.Audio;
-import junit.framework.TestCase;
-
-public class ExistenceTest extends TestCase {
- public void testPluginExists() {
- Audio.playSound(null);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/OrderedTestSuite.java b/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/OrderedTestSuite.java
deleted file mode 100644
index 7d30da3..0000000
--- a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/OrderedTestSuite.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.util.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.util.tests/src/org/eclipse/wst/server/util/tests/TestsPlugin.java b/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/TestsPlugin.java
deleted file mode 100644
index 41c191d..0000000
--- a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/TestsPlugin.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.util.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.util.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.util.tests/src/org/eclipse/wst/server/util/tests/dialog/PreferencesTestCase.java b/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/dialog/PreferencesTestCase.java
deleted file mode 100644
index af34aab..0000000
--- a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/dialog/PreferencesTestCase.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.util.tests.dialog;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.eclipse.jface.dialogs.Dialog;
-
-public class PreferencesTestCase extends TestCase {
- public static Test suite() {
- return new TestSuite(PreferencesTestCase.class);
- }
-
- public PreferencesTestCase(String name) {
- super(name);
- }
-
- public void testAudioPreferencePage() {
- Dialog dialog = UITestHelper.getPreferenceDialog("org.eclipse.wst.audio.preferencePage");
- UITestHelper.assertDialog(dialog);
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/dialog/UITestHelper.java b/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/dialog/UITestHelper.java
deleted file mode 100644
index 91da54a..0000000
--- a/tests/org.eclipse.wst.server.util.tests/src/org/eclipse/wst/server/util/tests/dialog/UITestHelper.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.server.util.tests.dialog;
-
-import java.util.Iterator;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import org.eclipse.core.runtime.IAdaptable;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.IPreferenceNode;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.preference.PreferenceManager;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.internal.WorkbenchPlugin;
-import org.eclipse.ui.internal.dialogs.PropertyDialog;
-import org.eclipse.ui.internal.dialogs.PropertyPageContributorManager;
-import org.eclipse.ui.internal.dialogs.PropertyPageManager;
-import org.eclipse.ui.model.IWorkbenchAdapter;
-
-public class UITestHelper extends TestCase {
- private static class PreferenceDialogWrapper extends PreferenceDialog {
- public PreferenceDialogWrapper(Shell parentShell, PreferenceManager manager) {
- super(parentShell, manager);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- private static class PropertyDialogWrapper extends PropertyDialog {
- public PropertyDialogWrapper(Shell parentShell, PreferenceManager manager, ISelection selection) {
- super(parentShell, manager, selection);
- }
- protected boolean showPage(IPreferenceNode node) {
- return super.showPage(node);
- }
- }
-
- protected static Shell getShell() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- }
-
- public static PreferenceDialog getPreferenceDialog(String id) {
- PreferenceDialogWrapper dialog = null;
- PreferenceManager manager = WorkbenchPlugin.getDefault().getPreferenceManager();
- if (manager != null) {
- dialog = new PreferenceDialogWrapper(getShell(), manager);
- dialog.create();
-
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();)
- {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- }
- return dialog;
- }
-
- public static PropertyDialog getPropertyDialog(String id, IAdaptable element) {
- PropertyDialogWrapper dialog = null;
-
- PropertyPageManager manager = new PropertyPageManager();
- String title = "";
- String name = "";
-
- // load pages for the selection
- // fill the manager with contributions from the matching contributors
- PropertyPageContributorManager.getManager().contribute(manager, element);
-
- IWorkbenchAdapter adapter = (IWorkbenchAdapter)element.getAdapter(IWorkbenchAdapter.class);
- if (adapter != null) {
- name = adapter.getLabel(element);
- }
-
- // testing if there are pages in the manager
- Iterator pages = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- if (!pages.hasNext())
- return null;
-
- title = WorkbenchMessages.format("PropertyDialog.propertyMessage", new Object[] {name});
- dialog = new PropertyDialogWrapper(getShell(), manager, new StructuredSelection(element));
- dialog.create();
- dialog.getShell().setText(title);
- for (Iterator iterator = manager.getElements(PreferenceManager.PRE_ORDER).iterator();
- iterator.hasNext();) {
- IPreferenceNode node = (IPreferenceNode)iterator.next();
- if ( node.getId().equals(id) ) {
- dialog.showPage(node);
- break;
- }
- }
- return dialog;
- }
-
- /**
- * Automated test that checks all the labels and buttons of a dialog
- * to make sure there is enough room to display all the text. Any
- * text that wraps is only approximated and is currently not accurate.
- *
- * @param dialog the test dialog to be verified.
- */
- public static void assertDialog(Dialog dialog) {
- Assert.assertNotNull(dialog);
- dialog.setBlockOnOpen(false);
- dialog.open();
- Shell shell = dialog.getShell();
- verifyCompositeText(shell);
- dialog.close();
- }
-
- /*
- * Looks at all the child widgets of a given composite and
- * verifies the text on all labels and widgets.
- * @param composite The composite to look through
- */
- private static void verifyCompositeText(Composite composite) {
- Control children[] = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- try {
- //verify the text if the child is a button
- verifyButtonText((Button) children[i]);
- } catch (ClassCastException exNotButton) {
- try {
- //child is not a button, maybe a label
- verifyLabelText((Label) children[i]);
- } catch (ClassCastException exNotLabel) {
- try {
- //child is not a label, make a recursive call if it is a composite
- verifyCompositeText((Composite) children[i]);
- } catch (ClassCastException exNotComposite) {
- //the child is not a button, label, or composite - ignore it.
- }
- }
- }
- }
- }
-
- /*
- * Verifies that a given button is large enough to display its text.
- * @param button The button to verify,
- */
- private static void verifyButtonText(Button button) {
- String widget = button.toString();
- Point size = button.getSize();
-
- // compute the size with no line wrapping
- Point preferred = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(button.getText()); //check for '\n\'
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
-
- String message =
- new StringBuffer("Warning: ")
- .append(widget)
- .append("\n\tActual Width -> ")
- .append(size.x)
- .append("\n\tRecommended Width -> ")
- .append(preferred.x)
- .toString();
- if (preferred.x > size.x) {
- //close the dialog
- button.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Verifies that a given label is large enough to display its text.
- * @param label The label to verify,
- */
- private static void verifyLabelText(Label label) {
- String widget = label.toString();
- Point size = label.getSize();
-
- // compute the size with no line wrapping
- Point preferred = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //if (size.y/preferred.y) == X, then label spans X lines, so divide
- //the calculated value of preferred.x by X
- if (preferred.y * size.y > 0) {
- preferred.y /= countLines(label.getText());
- if (size.y / preferred.y > 1) {
- preferred.x /= (size.y / preferred.y);
- }
- }
- String message = new StringBuffer("Warning: ").append(widget)
- .append("\n\tActual Width -> ").append(size.x)
- .append("\n\tRecommended Width -> ").append(preferred.x).toString();
- if (preferred.x > size.x) {
- //close the dialog
- label.getShell().dispose();
- Assert.assertTrue(message.toString(), false);
- }
- }
-
- /*
- * Counts the number of lines in a given String.
- * For example, if a string contains one (1) newline character,
- * a value of two (2) would be returned.
- * @param text The string to look through.
- * @return int the number of lines in text.
- */
- private static int countLines(String text) {
- int newLines = 1;
- for (int i = 0; i < text.length(); i++) {
- if (text.charAt(i) == '\n') {
- newLines++;
- }
- }
- return newLines;
- }
-}
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.server.util.tests/test.xml b/tests/org.eclipse.wst.server.util.tests/test.xml
deleted file mode 100644
index 813d49b..0000000
--- a/tests/org.eclipse.wst.server.util.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.util.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="ui-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.util.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