Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-01-15 11:19:45 +0000
committerAlexander Kurtakov2016-01-15 12:31:14 +0000
commit992254db13862074fceac0b04e5a375b15f010d8 (patch)
treed0dadb5b04f530a92598dd9cb8b19f101f15f5d2 /org.eclipse.ua.tests/help/org/eclipse/ua
parent799b16068970f0acfe3b9cc3d1b7a46ce182c4a0 (diff)
downloadeclipse.platform.ua-992254db13862074fceac0b04e5a375b15f010d8.tar.gz
eclipse.platform.ua-992254db13862074fceac0b04e5a375b15f010d8.tar.xz
eclipse.platform.ua-992254db13862074fceac0b04e5a375b15f010d8.zip
Bug 485918 - Convert org.eclipse.ua.tests to JUnit 4
Convert TestSuites. Change-Id: Ia8df70474f30634c8a2130b56f4bb854d12abd6c Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.ua.tests/help/org/eclipse/ua')
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/AllHelpTests.java45
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/AllCriteriaTests.java32
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/CriteriaDefinitionTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/AllDynamicTests.java26
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/XMLProcessorTest.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/AllIndexTests.java24
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/AllOtherHelpTests.java54
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextLinkSorter.java8
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/LinkUtilTest.java6
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/PathResolutionTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java12
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/AllPreferencesTests.java32
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/AllRemoteTests.java52
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/AllScopeTests.java32
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AllSearchTests.java54
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java11
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java11
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java19
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LockTest.java10
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MetaKeywords.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java24
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchCheatsheet.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchIntro.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java11
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantXMLTest.java11
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchRanking.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java42
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java13
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/AllWebappTests.java53
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java15
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/AllWebappServiceTests.java41
48 files changed, 269 insertions, 678 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/AllHelpTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/AllHelpTests.java
index 06bee8eaf..7961508d6 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/AllHelpTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/AllHelpTests.java
@@ -10,9 +10,6 @@
*******************************************************************************/
package org.eclipse.ua.tests.help;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.eclipse.ua.tests.help.criteria.AllCriteriaTests;
import org.eclipse.ua.tests.help.dynamic.AllDynamicTests;
import org.eclipse.ua.tests.help.index.AllIndexTests;
@@ -24,33 +21,25 @@ import org.eclipse.ua.tests.help.search.AllSearchTests;
import org.eclipse.ua.tests.help.toc.AllTocTests;
import org.eclipse.ua.tests.help.webapp.AllWebappTests;
import org.eclipse.ua.tests.help.webapp.service.AllWebappServiceTests;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help functionality (automated).
*/
-public class AllHelpTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllHelpTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllHelpTests() {
- addTest(AllPreferencesTests.suite());
- addTest(AllCriteriaTests.suite());
- addTest(AllDynamicTests.suite());
- addTest(AllSearchTests.suite());
- addTest(AllTocTests.suite());
- addTest(AllIndexTests.suite());
- addTest(AllWebappTests.suite());
- addTest(AllOtherHelpTests.suite());
- addTest(AllRemoteTests.suite());
- addTest(AllScopeTests.suite());
- addTest(AllWebappServiceTests.suite());
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ AllPreferencesTests.class,
+ AllCriteriaTests.class,
+ AllDynamicTests.class,
+ AllSearchTests.class,
+ AllTocTests.class,
+ AllIndexTests.class,
+ AllWebappTests.class,
+ AllOtherHelpTests.class,
+ AllRemoteTests.class,
+ AllScopeTests.class,
+ AllWebappServiceTests.class,
+})
+public class AllHelpTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/AllCriteriaTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/AllCriteriaTests.java
index 0fc0b9bc1..1819b3563 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/AllCriteriaTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/AllCriteriaTests.java
@@ -10,29 +10,19 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.criteria;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help keyword index functionality.
*/
-public class AllCriteriaTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllCriteriaTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllCriteriaTests() {
- addTestSuite(ParseTocWithCriteria.class);
- addTestSuite(CriteriaUtilitiesTest.class);
- addTestSuite(CriteriaDefinitionTest.class);
- addTestSuite(ParseCriteriaDefinition.class);
- addTestSuite(TestCriteriaProvider.class);
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ParseTocWithCriteria.class,
+ CriteriaUtilitiesTest.class,
+ CriteriaDefinitionTest.class,
+ ParseCriteriaDefinition.class,
+ TestCriteriaProvider.class
+})
+public class AllCriteriaTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/CriteriaDefinitionTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/CriteriaDefinitionTest.java
index 206153e93..ac6c2ef8e 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/CriteriaDefinitionTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/CriteriaDefinitionTest.java
@@ -11,10 +11,6 @@
package org.eclipse.ua.tests.help.criteria;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.ICriterionDefinition;
import org.eclipse.help.ICriterionValueDefinition;
import org.eclipse.help.internal.UAElement;
@@ -24,6 +20,8 @@ import org.eclipse.help.internal.criteria.CriterionValueDefinition;
import org.eclipse.ua.tests.help.other.UserCriterionDefinition;
import org.eclipse.ua.tests.help.other.UserCriterionValueDefinition;
+import junit.framework.TestCase;
+
public class CriteriaDefinitionTest extends TestCase {
private static final String VALUEID1 = "valueid1";
@@ -33,10 +31,6 @@ public class CriteriaDefinitionTest extends TestCase {
private static final String CRITERIONID1 = "criterionid1";
private static final String CRITERIONNAME1 = "first criterion";
- public static Test suite() {
- return new TestSuite(CriteriaDefinitionTest.class);
- }
-
// Criterion Value
public void testCriterionValueDefinition() {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java
index 1345a9b6b..860f392ee 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseCriteriaDefinition.java
@@ -14,10 +14,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.internal.UAElement;
import org.eclipse.help.internal.criteria.CriteriaDefinition;
import org.eclipse.help.internal.criteria.CriteriaDefinitionAssembler;
@@ -27,15 +23,10 @@ import org.eclipse.help.internal.criteria.CriteriaDefinitionFileParser;
import org.eclipse.help.internal.dynamic.DocumentWriter;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
+import junit.framework.TestCase;
+
public class ParseCriteriaDefinition extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ParseCriteriaDefinition.class);
- }
-
public void testAssemble() throws Exception {
CriteriaDefinitionFileParser parser = new CriteriaDefinitionFileParser();
CriteriaDefinitionContribution a = parser.parse(new CriteriaDefinitionFile(UserAssistanceTestPlugin.getPluginId(), "data/help/criteria/criteria_definition/a.xml", "en"));
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java
index e97706995..f079dc912 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/criteria/ParseTocWithCriteria.java
@@ -17,10 +17,6 @@ import java.util.Set;
import javax.xml.parsers.ParserConfigurationException;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.ICriteria;
import org.eclipse.help.IToc;
import org.eclipse.help.IToc2;
@@ -40,15 +36,10 @@ import org.eclipse.ua.tests.help.other.UserTopic2;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
import org.xml.sax.SAXException;
+import junit.framework.TestCase;
+
public class ParseTocWithCriteria extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ParseTocWithCriteria.class);
- }
-
private IToc2 parseToc(String filename) throws IOException, SAXException,
ParserConfigurationException {
IToc toc;
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/AllDynamicTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/AllDynamicTests.java
index e259a9795..f8fc390c5 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/AllDynamicTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/AllDynamicTests.java
@@ -10,26 +10,16 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.dynamic;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help dynamic content functionality (automated).
*/
-public class AllDynamicTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllDynamicTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllDynamicTests() {
- addTest(XMLProcessorTest.suite());
- addTest(DynamicXHTMLProcessorTest.suite());
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ XMLProcessorTest.class,
+ DynamicXHTMLProcessorTest.class
+})
+public class AllDynamicTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java
index f71da8403..6d94b18ce 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/DynamicXHTMLProcessorTest.java
@@ -18,10 +18,6 @@ import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.internal.xhtml.DynamicXHTMLProcessor;
import org.eclipse.help.ui.internal.HelpUIPlugin;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
@@ -29,15 +25,10 @@ import org.eclipse.ua.tests.util.XMLUtil;
import org.osgi.framework.Bundle;
import org.xml.sax.SAXException;
+import junit.framework.TestCase;
+
public class DynamicXHTMLProcessorTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(DynamicXHTMLProcessorTest.class);
- }
-
@Override
protected void setUp() throws Exception {
// activate the UI plug-in for UI filtering ability
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/XMLProcessorTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/XMLProcessorTest.java
index 09e4a5e59..7706acd70 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/XMLProcessorTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/dynamic/XMLProcessorTest.java
@@ -12,10 +12,6 @@ package org.eclipse.ua.tests.help.dynamic;
import java.io.InputStream;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.base.HelpEvaluationContext;
import org.eclipse.help.internal.dynamic.DocumentReader;
@@ -30,15 +26,10 @@ import org.eclipse.ua.tests.util.FileUtil;
import org.eclipse.ua.tests.util.XMLUtil;
import org.osgi.framework.Bundle;
+import junit.framework.TestCase;
+
public class XMLProcessorTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(XMLProcessorTest.class);
- }
-
@Override
protected void setUp() throws Exception {
// activate the UI plug-in for UI filtering ability
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/AllIndexTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/AllIndexTests.java
index aff92e85b..09e38e9c4 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/AllIndexTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/AllIndexTests.java
@@ -10,25 +10,15 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.index;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help keyword index functionality.
*/
-public class AllIndexTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllIndexTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllIndexTests() {
- addTest(IndexAssemblerTest.suite());
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ IndexAssemblerTest.class
+})
+public class AllIndexTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java
index 0698f5b50..5f6857c20 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/index/IndexAssemblerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -14,10 +14,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.IIndexEntry;
import org.eclipse.help.IIndexEntry2;
@@ -36,15 +32,10 @@ import org.eclipse.help.internal.index.IndexFileParser;
import org.eclipse.help.internal.index.IndexSee;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
+import junit.framework.TestCase;
+
public class IndexAssemblerTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(IndexAssemblerTest.class);
- }
-
public void testAssemble() throws Exception {
IndexFileParser parser = new IndexFileParser();
IndexContribution a = parser.parse(new IndexFile(UserAssistanceTestPlugin.getPluginId(), "data/help/index/assembler/a.xml", "en"));
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/AllOtherHelpTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/AllOtherHelpTests.java
index ab0bdd70d..98e689c31 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/AllOtherHelpTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/AllOtherHelpTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2016 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
@@ -11,36 +11,26 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
-public class AllOtherHelpTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllOtherHelpTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllOtherHelpTests() {
- addTest(LinkUtilTest.suite());
- addTestSuite(TestEscapeUtils.class);
- addTestSuite(ContextLinkSorter.class);
- addTestSuite(UAElementTest.class);
- addTestSuite(ContextTest.class);
- addTestSuite(TopicTest.class);
- addTestSuite(TocObjectTest.class);
- addTestSuite(DocumentReaderTest.class);
- addTestSuite(EntityResolutionTest.class);
- addTestSuite(ResourceTest.class);
- addTestSuite(ConcurrentTocAccess.class);
- addTestSuite(XHTMLEntityTest.class);
- addTestSuite(PathResolutionTest.class);
- addTestSuite(IndexEntryTest.class);
- addTestSuite(IndexSeeTest.class);
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ LinkUtilTest.class,
+ TestEscapeUtils.class,
+ ContextLinkSorter.class,
+ UAElementTest.class,
+ ContextTest.class,
+ TopicTest.class,
+ TocObjectTest.class,
+ DocumentReaderTest.class,
+ EntityResolutionTest.class,
+ ResourceTest.class,
+ ConcurrentTocAccess.class,
+ XHTMLEntityTest.class,
+ PathResolutionTest.class,
+ IndexEntryTest.class,
+ IndexSeeTest.class
+})
+public class AllOtherHelpTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java
index 19e0f74ed..0f017ed6d 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ConcurrentTocAccess.java
@@ -11,16 +11,14 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.ITopic;
import org.eclipse.help.internal.toc.Toc;
import org.eclipse.ua.tests.help.util.DocumentCreator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import junit.framework.TestCase;
+
public class ConcurrentTocAccess extends TestCase {
private boolean checkAttributes = true;
@@ -28,10 +26,6 @@ public class ConcurrentTocAccess extends TestCase {
// Set enableTimeout to false for debugging
private boolean enableTimeout = true;
- public static Test suite() {
- return new TestSuite(ConcurrentTocAccess.class);
- }
-
private class TocGenerator {
private int[] dimensions;
private StringBuffer result;
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextLinkSorter.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextLinkSorter.java
index 85b654a3f..d5526327b 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextLinkSorter.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextLinkSorter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -15,9 +15,7 @@ import org.eclipse.help.IContext2;
import org.eclipse.help.IHelpResource;
import org.eclipse.help.ui.internal.views.ContextHelpSorter;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
public class ContextLinkSorter extends TestCase {
@@ -81,10 +79,6 @@ public class ContextLinkSorter extends TestCase {
}
- public static Test suite() {
- return new TestSuite(ContextLinkSorter.class);
- }
-
public void testSortEmptyArray() {
ContextHelpSorter sorter = new ContextHelpSorter(new TestContext());
TestResource[] resources = new TestResource[0];
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java
index 57d7e940a..ac235ed4e 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextMergeTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -11,10 +11,6 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.IHelpResource;
import org.eclipse.help.IUAElement;
import org.eclipse.help.internal.context.Context;
@@ -22,6 +18,8 @@ import org.eclipse.ua.tests.help.util.DocumentCreator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import junit.framework.TestCase;
+
public class ContextMergeTest extends TestCase {
private static final String ENABLEMENT_CHEATSHEETS = "<enablement><with variable=\"platform\">" +
@@ -36,10 +34,6 @@ public class ContextMergeTest extends TestCase {
private final String TOPIC_WITH_ENABLEMENT = TOPIC_HEAD_ECLIPSE + ENABLEMENT_CHEATSHEETS + TOPIC_END;
private final String END_CONTEXT = "</context>";
- public static Test suite() {
- return new TestSuite(ContextMergeTest.class);
- }
-
private Context createContext(final String contextSource) {
Context context;
Document doc;
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java
index 7ee287ef8..14b2bfb49 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/ContextTest.java
@@ -11,10 +11,6 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.IHelpResource;
import org.eclipse.help.IUAElement;
import org.eclipse.help.internal.Topic;
@@ -26,6 +22,8 @@ import org.eclipse.ua.tests.help.util.DocumentCreator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import junit.framework.TestCase;
+
public class ContextTest extends TestCase {
private static final String ENABLEMENT_CHEATSHEETS = "<enablement><with variable=\"platform\">" +
@@ -49,10 +47,6 @@ public class ContextTest extends TestCase {
private final String TOPIC_FILTER_OUT = TOPIC_HEAD_ECLIPSE + FILTER_OUT + TOPIC_END;
private final String END_CONTEXT = "</context>";
- public static Test suite() {
- return new TestSuite(ContextTest.class);
- }
-
@Override
protected void setUp() throws Exception {
// Required for isEnabled() to work correctly
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java
index 615ff3fd7..7d58ad8d8 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/DocumentReaderTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -16,24 +16,18 @@ import java.io.InputStream;
import javax.xml.parsers.ParserConfigurationException;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.internal.dynamic.DocumentReader;
import org.eclipse.help.internal.util.ResourceLocator;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
import org.xml.sax.SAXException;
+import junit.framework.TestCase;
+
public class DocumentReaderTest extends TestCase {
private final static int RUNNING = 0;
private final static int SUCCESS = 1;
private final static int FAILURE = 2;
- public static Test suite() {
- return new TestSuite(DocumentReaderTest.class);
- }
-
private void readFile(DocumentReader docReader, String file) throws IOException, SAXException, ParserConfigurationException {
String pluginId = UserAssistanceTestPlugin.getPluginId();
String locale = "en";
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java
index f831d950a..cc27d932a 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexEntryTest.java
@@ -11,10 +11,6 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.IIndexEntry;
import org.eclipse.help.IIndexEntry2;
import org.eclipse.help.IIndexSee;
@@ -28,6 +24,8 @@ import org.eclipse.ua.tests.help.util.DocumentCreator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import junit.framework.TestCase;
+
public class IndexEntryTest extends TestCase {
private static final String ECLIPSE = "eclipse";
@@ -67,10 +65,6 @@ public class IndexEntryTest extends TestCase {
private final String ENTRY_WITH_TOPIC = ENTRY_HEAD_ECLIPSE + TOPIC_BUGZILLA + ENTRY_END;
private final String ENTRY_WITH_SEE = ENTRY_HEAD_ECLIPSE + SEE_ALSO_SDK + ENTRY_END;
- public static Test suite() {
- return new TestSuite(IndexEntryTest.class);
- }
-
@Override
protected void setUp() throws Exception {
BaseHelpSystem.setMode(BaseHelpSystem.MODE_WORKBENCH);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java
index 0fa6808b9..4296cf479 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/IndexSeeTest.java
@@ -11,10 +11,6 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.IIndexSee;
import org.eclipse.help.IIndexSubpath;
import org.eclipse.help.internal.base.BaseHelpSystem;
@@ -24,6 +20,8 @@ import org.eclipse.ua.tests.help.util.DocumentCreator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import junit.framework.TestCase;
+
public class IndexSeeTest extends TestCase {
private static final String AGUILA = "\u00E1guila"; // 00E1 is an accented letter 'a'
@@ -44,10 +42,6 @@ public class IndexSeeTest extends TestCase {
private static final String SEE_ECLIPSE_SDK_VIEWS = SEE_HEAD_ECLIPSE +
SUBPATH_SDK + SUBPATH_END + SUBPATH_VIEWS + SUBPATH_END + SEE_END;
- public static Test suite() {
- return new TestSuite(IndexSeeTest.class);
- }
-
@Override
protected void setUp() throws Exception {
BaseHelpSystem.setMode(BaseHelpSystem.MODE_WORKBENCH);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/LinkUtilTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/LinkUtilTest.java
index 2fb9a5869..68abf8fa5 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/LinkUtilTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/LinkUtilTest.java
@@ -14,16 +14,10 @@ package org.eclipse.ua.tests.help.other;
import org.eclipse.help.internal.base.util.LinkUtil;
import org.eclipse.ui.internal.cheatsheets.views.ViewUtilities;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
public class LinkUtilTest extends TestCase {
- public static Test suite() {
- return new TestSuite(LinkUtilTest.class);
- }
-
public void testStripParamNull() {
assertEquals(null, LinkUtil.stripParams(null));
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/PathResolutionTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/PathResolutionTest.java
index fbd15cfbe..98231b03b 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/PathResolutionTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/PathResolutionTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -11,20 +11,14 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.util.ProductPreferences;
import org.osgi.framework.Bundle;
-public class PathResolutionTest extends TestCase {
+import junit.framework.TestCase;
- public static Test suite() {
- return new TestSuite(PathResolutionTest.class);
- }
+public class PathResolutionTest extends TestCase {
public void testResolveNull() {
assertEquals(null, ProductPreferences.resolveSpecialIdentifiers(null));
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
index 278d9ca52..00f352741 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/TopicTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -11,10 +11,6 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.ITopic;
import org.eclipse.help.internal.Topic;
import org.eclipse.help.internal.base.BaseHelpSystem;
@@ -23,6 +19,8 @@ import org.eclipse.ua.tests.help.util.DocumentCreator;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import junit.framework.TestCase;
+
public class TopicTest extends TestCase {
private static final String ECLIPSE_HREF = "http://www.eclipse.org";
@@ -59,10 +57,6 @@ public class TopicTest extends TestCase {
+ " label=\"Transformations and transformation configurations\"/>";
private final String TOPIC_WITH_CHILD = TOPIC_HEAD_ECLIPSE + TOPIC_BUGZILLA + TOPIC_END;
- public static Test suite() {
- return new TestSuite(TopicTest.class);
- }
-
@Override
protected void setUp() throws Exception {
// Required for isEnabled() to work correctly
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java
index b7b47cf13..4f7771247 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/other/UAElementTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2016 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
@@ -11,14 +11,12 @@
package org.eclipse.ua.tests.help.other;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.IUAElement;
import org.eclipse.help.internal.Topic;
import org.eclipse.help.internal.UAElement;
+import junit.framework.TestCase;
+
public class UAElementTest extends TestCase {
private UAElement parent1;
@@ -29,10 +27,6 @@ public class UAElementTest extends TestCase {
private UAElement child4;
private UAElement grandchild1;
- public static Test suite() {
- return new TestSuite(UAElementTest.class);
- }
-
public void testSimpleUAElement() {
UAElement element = new UAElement("name1");
assertEquals("name1", element.getElementName());
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/AllPreferencesTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/AllPreferencesTests.java
index 4d8300c76..9ee50cb41 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/AllPreferencesTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/AllPreferencesTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -10,28 +10,18 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.preferences;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help preferences functionality (automated).
*/
-public class AllPreferencesTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllPreferencesTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllPreferencesTests() {
- addTest(ProductPreferencesTest.suite());
- addTest(HelpDataTest.suite());
- addTestSuite(CssPreferences.class);
- addTestSuite(BookmarksTest.class);
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ProductPreferencesTest.class,
+ HelpDataTest.class,
+ CssPreferences.class,
+ BookmarksTest.class
+})
+public class AllPreferencesTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
index 914795c85..2ad74dd7d 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/HelpDataTest.java
@@ -16,10 +16,6 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
@@ -28,6 +24,8 @@ import org.eclipse.help.internal.HelpPlugin;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
import org.junit.Assert;
+import junit.framework.TestCase;
+
/*
* Tests the help data ordering of tocs and hiding tocs, indexes, etc.
*/
@@ -39,13 +37,6 @@ public class HelpDataTest extends TestCase {
{ { "data/help/preferences/helpData3.xml" }, { }, { }, { } },
};
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(HelpDataTest.class);
- }
-
private String baseTocsPreference;
private String ignoredTocsPreference;
private String ignoredIndexesPreference;
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java
index c0a415ecf..ef7667434 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/preferences/ProductPreferencesTest.java
@@ -16,14 +16,12 @@ import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.internal.util.ProductPreferences;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
import org.junit.Assert;
+import junit.framework.TestCase;
+
/*
* Tests the products preferences utility
*/
@@ -136,13 +134,6 @@ public class ProductPreferencesTest extends TestCase {
{ "mixed; space, and separators", "mixed", "space", "and", "separators" }
};
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ProductPreferencesTest.class);
- }
-
public void testGetOrderedList() {
for (String[] data : GET_ORDERED_LIST_DATA) {
List<String> items = ProductPreferences.tokenize(data[0]);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/AllRemoteTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/AllRemoteTests.java
index e8d2d02cc..4ed5bb239 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/AllRemoteTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/remote/AllRemoteTests.java
@@ -10,39 +10,29 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.remote;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help keyword index functionality.
*/
-public class AllRemoteTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllRemoteTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllRemoteTests() {
- addTestSuite(RemotePreferenceTest.class);
- addTestSuite(TocServletTest.class);
- addTestSuite(SearchServletTest.class);
- addTestSuite(IndexServletTest.class);
- addTestSuite(ContentServletTest.class);
- addTestSuite(ContextServletTest.class);
- addTestSuite(LoadTocUsingRemoteHelp.class);
- addTestSuite(SearchUsingRemoteHelp.class);
- addTestSuite(LoadIndexUsingRemoteHelp.class);
- addTest(GetContentUsingRemoteHelp.suite());
- addTestSuite(GetContextUsingRemoteHelp.class);
- addTestSuite(TocManagerTest.class);
- addTestSuite(SearchIndexCreation.class);
- addTestSuite(ParallelSearchUsingRemote.class);
- addTestSuite(ParallelSearchServletTest.class);
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ RemotePreferenceTest.class,
+ TocServletTest.class,
+ SearchServletTest.class,
+ IndexServletTest.class,
+ ContentServletTest.class,
+ ContextServletTest.class,
+ LoadTocUsingRemoteHelp.class,
+ SearchUsingRemoteHelp.class,
+ LoadIndexUsingRemoteHelp.class,
+ GetContentUsingRemoteHelp.class,
+ GetContextUsingRemoteHelp.class,
+ TocManagerTest.class,
+ SearchIndexCreation.class,
+ ParallelSearchUsingRemote.class,
+ ParallelSearchServletTest.class
+})
+public class AllRemoteTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/AllScopeTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/AllScopeTests.java
index f5bbb5a9f..6cc17b360 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/AllScopeTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/scope/AllScopeTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -10,28 +10,18 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.scope;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help dynamic content functionality (automated).
*/
-public class AllScopeTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllScopeTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllScopeTests() {
- addTestSuite(IntersectionTest.class);
- addTestSuite(ScopeHierarchy.class);
- addTestSuite(EmptyLeafRemoval.class);
- addTestSuite(ScopeSetManagerTest.class);
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ IntersectionTest.class,
+ ScopeHierarchy.class,
+ EmptyLeafRemoval.class,
+ ScopeSetManagerTest.class
+})
+public class AllScopeTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AllSearchTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AllSearchTests.java
index a8a67b42c..8ee531f24 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AllSearchTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/AllSearchTests.java
@@ -10,40 +10,30 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.search;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help functionality (automated).
*/
-public class AllSearchTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllSearchTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllSearchTests() {
- addTest(ExtraDirTest.suite());
- addTest(BasicTest.suite());
- addTestSuite(WildcardTest.class);
- addTestSuite(LocaleTest.class);
- addTestSuite(AnalyzerTest.class);
- addTest(SearchCheatsheet.suite());
- addTest(SearchIntro.suite());
- addTest(EncodedCharacterSearch.suite());
- addTest(MetaKeywords.suite());
- addTest(SearchParticipantTest.suite());
- addTest(SearchParticipantXMLTest.suite());
- addTest(SearchRanking.suite());
- addTestSuite(WorkingSetManagerTest.class);
- addTestSuite(InfocenterWorkingSetManagerTest.class);
- addTestSuite(PrebuiltIndexCompatibility.class);
- addTestSuite(LockTest.class);
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ExtraDirTest.class,
+ BasicTest.class,
+ WildcardTest.class,
+ LocaleTest.class,
+ AnalyzerTest.class,
+ SearchCheatsheet.class,
+ SearchIntro.class,
+ EncodedCharacterSearch.class,
+ MetaKeywords.class,
+ SearchParticipantTest.class,
+ SearchParticipantXMLTest.class,
+ SearchRanking.class,
+ WorkingSetManagerTest.class,
+ InfocenterWorkingSetManagerTest.class,
+ PrebuiltIndexCompatibility.class,
+ LockTest.class
+})
+public class AllSearchTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java
index 68680de57..0453280c4 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/BasicTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -11,20 +11,11 @@
package org.eclipse.ua.tests.help.search;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
public class BasicTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(BasicTest.class);
- }
-
public void testSearchUnfiltered() {
SearchTestUtils.searchAllLocales("jehcyqpfjs", new String[] { "/org.eclipse.ua.tests/data/help/search/test1.xhtml" });
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java
index 1dd487662..cc6555a42 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/EncodedCharacterSearch.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -11,19 +11,10 @@
package org.eclipse.ua.tests.help.search;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
public class EncodedCharacterSearch extends TestCase {
-
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(EncodedCharacterSearch.class);
- }
public void testIso8859() {
SearchTestUtils.searchOneLocale("\u00E1guilaxaxcs", new String[] {"/org.eclipse.ua.tests/data/help/search/testnl8859.htm" }, "en");
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java
index f97df381e..3d1cc4de1 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/ExtraDirTest.java
@@ -17,12 +17,8 @@ import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.junit.Assert;
-
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.search.ISearchQuery;
import org.eclipse.help.internal.search.SearchHit;
@@ -32,19 +28,12 @@ import org.eclipse.help.internal.workingset.AdaptableHelpResource;
import org.eclipse.help.internal.workingset.AdaptableToc;
import org.eclipse.help.internal.workingset.WorkingSet;
import org.eclipse.help.internal.workingset.WorkingSetManager;
+import org.junit.Assert;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
+import junit.framework.TestCase;
public class ExtraDirTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ExtraDirTest.class);
- }
-
// try without search scope
public void testNoScope()
{
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LockTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LockTest.java
index 55ffa0f20..944eee32d 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LockTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/LockTest.java
@@ -13,20 +13,14 @@ package org.eclipse.ua.tests.help.search;
import java.nio.channels.OverlappingFileLockException;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.internal.search.SearchIndex;
+import junit.framework.TestCase;
+
/**
* Test locking of search index
*/
public class LockTest extends TestCase {
-
- public static Test suite() {
- return new TestSuite(LockTest.class);
- }
public void testSingleLock() {
SearchIndex index1 = new SearchIndex(null, null, null);
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MetaKeywords.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MetaKeywords.java
index b45f59d3d..74f9ae08c 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MetaKeywords.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/MetaKeywords.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -13,10 +13,6 @@ package org.eclipse.ua.tests.help.search;
import java.util.ArrayList;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.search.ISearchQuery;
@@ -24,15 +20,10 @@ import org.eclipse.help.internal.search.SearchHit;
import org.eclipse.help.internal.search.SearchQuery;
import org.eclipse.help.internal.search.SearchResults;
+import junit.framework.TestCase;
+
public class MetaKeywords extends TestCase {
-
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(MetaKeywords.class);
- }
public void testKeywordInHtml() {
SearchTestUtils.searchAllLocales("ydhaedrsc", new String[] { "/org.eclipse.ua.tests/data/help/search/testMeta.htm" });
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
index 640d4c9ad..706a0816f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/PrebuiltIndexCompatibility.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 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
@@ -17,12 +17,6 @@ import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.osgi.framework.Bundle;
-
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.IndexSearcher;
@@ -30,17 +24,18 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.NIOFSDirectory;
-
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.help.internal.base.BaseHelpSystem;
import org.eclipse.help.internal.search.AnalyzerDescriptor;
import org.eclipse.help.internal.search.PluginIndex;
import org.eclipse.help.internal.search.QueryBuilder;
import org.eclipse.help.internal.search.SearchIndexWithIndexingProgress;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
+import org.osgi.framework.Bundle;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
+import junit.framework.TestCase;
/**
* Verify that older versions of the index can be read by this
@@ -55,13 +50,6 @@ import org.eclipse.core.runtime.Path;
*/
public class PrebuiltIndexCompatibility extends TestCase {
-
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(PrebuiltIndexCompatibility.class);
- }
/**
* Test index built with Lucene 1.9.1
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchCheatsheet.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchCheatsheet.java
index aa6f5c51f..db1a47d99 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchCheatsheet.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchCheatsheet.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -13,10 +13,6 @@ package org.eclipse.ua.tests.help.search;
import java.util.ArrayList;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.base.BaseHelpSystem;
@@ -25,15 +21,10 @@ import org.eclipse.help.internal.search.SearchHit;
import org.eclipse.help.internal.search.SearchQuery;
import org.eclipse.help.internal.search.SearchResults;
+import junit.framework.TestCase;
+
public class SearchCheatsheet extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(SearchCheatsheet.class);
- }
-
public SearchHit[] findHits(String searchWord) {
ISearchQuery query = new SearchQuery(searchWord, false, new ArrayList<String>(), Platform.getNL());
SearchResults collector = new SearchResults(null, 10, Platform.getNL());
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchIntro.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchIntro.java
index 3f4af3869..091b6c72b 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchIntro.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchIntro.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -13,10 +13,6 @@ package org.eclipse.ua.tests.help.search;
import java.util.ArrayList;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.base.BaseHelpSystem;
@@ -25,15 +21,10 @@ import org.eclipse.help.internal.search.SearchHit;
import org.eclipse.help.internal.search.SearchQuery;
import org.eclipse.help.internal.search.SearchResults;
+import junit.framework.TestCase;
+
public class SearchIntro extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(SearchIntro.class);
- }
-
public SearchHit[] findHits(String searchWord) {
ISearchQuery query = new SearchQuery(searchWord, false, new ArrayList<String>(), Platform.getNL());
SearchResults collector = new SearchResults(null, 10, Platform.getNL());
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java
index 223e42a99..7d9d45789 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -13,19 +13,10 @@ package org.eclipse.ua.tests.help.search;
import org.eclipse.help.internal.search.SearchHit;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
public class SearchParticipantTest extends TestCase {
-
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(SearchParticipantTest.class);
- }
public void testSearchFirstWordInFirstDoc() {
SearchTestUtils.searchAllLocales("jkijkijkk", new String[] { "/org.eclipse.ua.tests/participant1.xml" });
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantXMLTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantXMLTest.java
index 181c3644e..db2c6561c 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantXMLTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchParticipantXMLTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -13,20 +13,11 @@ package org.eclipse.ua.tests.help.search;
import org.eclipse.help.internal.search.SearchHit;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
public class SearchParticipantXMLTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(SearchParticipantXMLTest.class);
- }
-
public void testSearchFirstWordInFirstDoc() {
SearchTestUtils.searchAllLocales("jfplepdl", new String[] { MockSearchParticipantXML.DOC_1 });
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchRanking.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchRanking.java
index a7573296b..a2c3a76d7 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchRanking.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/search/SearchRanking.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2011 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -14,10 +14,6 @@ package org.eclipse.ua.tests.help.search;
import java.util.ArrayList;
import java.util.Arrays;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.internal.base.BaseHelpSystem;
@@ -26,15 +22,10 @@ import org.eclipse.help.internal.search.SearchHit;
import org.eclipse.help.internal.search.SearchQuery;
import org.eclipse.help.internal.search.SearchResults;
+import junit.framework.TestCase;
+
public class SearchRanking extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(SearchRanking.class);
- }
-
public SearchHit[] findHits(String searchWord) {
ISearchQuery query = new SearchQuery(searchWord, false, new ArrayList<String>(), Platform.getNL());
SearchResults collector = new SearchResults(null, 10, Platform.getNL());
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java
index 1c4ebf116..684f3862f 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/AllTocTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -10,33 +10,23 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.toc;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests help table of contents functionality.
*/
-public class AllTocTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllTocTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllTocTests() {
- addTest(TocAssemblerTest.suite());
- addTest(EnabledTopicTest.suite());
- addTestSuite(TopicFinderTest.class);
- addTestSuite(TocSortingTest.class);
- addTestSuite(TopicSortingTest.class);
- addTestSuite(TocIconTest.class);
- addTestSuite(TocIconPathTest.class);
- addTestSuite(TocProviderTest.class);
- addTestSuite(HelpData.class);
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ TocAssemblerTest.class,
+ EnabledTopicTest.class,
+ TopicFinderTest.class,
+ TocSortingTest.class,
+ TopicSortingTest.class,
+ TocIconTest.class,
+ TocIconPathTest.class,
+ TocProviderTest.class,
+ HelpData.class
+})
+public class AllTocTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
index 72f03c025..7f2408ea7 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/EnabledTopicTest.java
@@ -13,10 +13,6 @@ package org.eclipse.ua.tests.help.toc;
import java.util.ArrayList;
import java.util.List;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.expressions.IEvaluationContext;
import org.eclipse.help.IIndexEntry;
import org.eclipse.help.ITopic;
@@ -24,6 +20,8 @@ import org.eclipse.help.IUAElement;
import org.eclipse.help.internal.UAElement;
import org.eclipse.help.internal.webapp.data.EnabledTopicUtils;
+import junit.framework.TestCase;
+
public class EnabledTopicTest extends TestCase {
private class ETopic implements ITopic {
@@ -124,13 +122,6 @@ public class EnabledTopicTest extends TestCase {
}
}
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(EnabledTopicTest.class);
- }
-
public void testEnabledTopic() {
assertTrue(EnabledTopicUtils.isEnabled(new ETopic("T1", true)));
assertFalse(EnabledTopicUtils.isEnabled(new ETopic("T2", false)));
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java
index 3922f314c..e15a3dda8 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocAssemblerTest.java
@@ -14,10 +14,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.IToc;
import org.eclipse.help.internal.dynamic.DocumentWriter;
import org.eclipse.help.internal.toc.Toc;
@@ -28,14 +24,9 @@ import org.eclipse.help.internal.toc.TocFileParser;
import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
import org.eclipse.ua.tests.util.XMLUtil;
+import junit.framework.TestCase;
+
public class TocAssemblerTest extends TestCase {
-
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(TocAssemblerTest.class);
- }
public void testAssemble() throws Exception {
TocFileParser parser = new TocFileParser();
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java
index a31d39aee..9d49f5dda 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2015 IBM Corporation and others.
+ * Copyright (c) 2009, 2016 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
@@ -10,23 +10,14 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.toc;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.IToc;
import org.eclipse.help.ITopic;
import org.eclipse.help.internal.HelpPlugin;
+import junit.framework.TestCase;
+
public class TocProviderTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(TocProviderTest.class);
- }
-
/**
* Verify that the tocProvider extension in this plug-in contributes a TOC which can be linked to an anchor
*/
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java
index ed1e1af1c..62e48ea8d 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/ProducerSerializerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -13,10 +13,6 @@ package org.eclipse.ua.tests.help.util;
import java.io.FileOutputStream;
import java.io.PrintWriter;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.HelpSystem;
import org.eclipse.help.IToc;
import org.eclipse.help.ITopic;
@@ -24,6 +20,8 @@ import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
import org.eclipse.ua.tests.util.FileUtil;
import org.eclipse.ua.tests.util.XHTMLUtil;
+import junit.framework.TestCase;
+
/*
* A utility for regenerating the _expected.txt files that contain the
* expected result for the producer content model when serialized.
@@ -44,13 +42,6 @@ import org.eclipse.ua.tests.util.XHTMLUtil;
*/
public class ProducerSerializerTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ProducerSerializerTest.class);
- }
-
public void testGenerateOutput() throws Exception {
IToc[] tocs = HelpSystem.getTocs();
for (IToc toc : tocs) {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java
index abf18bcb6..1abe5cc70 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/util/TocModelSerializerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2015 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -14,10 +14,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
@@ -26,6 +22,8 @@ import org.eclipse.help.internal.HelpPlugin;
import org.eclipse.help.internal.toc.TocFile;
import org.eclipse.help.ui.internal.HelpUIPlugin;
+import junit.framework.TestCase;
+
/*
* A utility for regenerating the _expected.txt files that contain the expected
* result for the TOC model when serialized. This reads all the TOC content from
@@ -44,13 +42,6 @@ import org.eclipse.help.ui.internal.HelpUIPlugin;
* The new files should appear.
*/
public class TocModelSerializerTest extends TestCase {
-
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(TocModelSerializerTest.class);
- }
/*
* Ensure that org.eclipse.help.ui is started. It contributes extra content
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/AllWebappTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/AllWebappTests.java
index de9e550c6..8ec2d1bd6 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/AllWebappTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/AllWebappTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 IBM Corporation and others.
+ * Copyright (c) 2006, 2016 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
@@ -10,38 +10,29 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.webapp;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests utility classes and servlets used in Web Application
*/
-public class AllWebappTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "org.eclipse.ua.tests.help.AllWebappTests");
- //$JUnit-BEGIN$
- suite.addTestSuite(BrowserIdentificationTest.class);
- suite.addTestSuite(TopicPathTest.class);
- suite.addTestSuite(FilterTest.class);
- suite.addTestSuite(PluginsRootReplacement.class);
- suite.addTestSuite(UrlCoderTest.class);
- suite.addTestSuite(UrlUtilsTests.class);
- suite.addTestSuite(LocaleTest.class);
- suite.addTestSuite(PrintSubtopics.class);
- suite.addTestSuite(RestrictedTopicParameter.class);
- suite.addTestSuite(FilterExtensionTest.class);
- suite.addTestSuite(FragmentServletTest.class);
- suite.addTestSuite(HelpServerInterrupt.class);
- suite.addTestSuite(HelpServerBinding.class);
- suite.addTestSuite(HtmlCoderTest.class);
- suite.addTestSuite(TocZipTest.class);
- //$JUnit-END$
- return suite;
- }
-
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ BrowserIdentificationTest.class,
+ TopicPathTest.class,
+ FilterTest.class,
+ PluginsRootReplacement.class,
+ UrlCoderTest.class,
+ UrlUtilsTests.class,
+ LocaleTest.class,
+ PrintSubtopics.class,
+ RestrictedTopicParameter.class,
+ FilterExtensionTest.class,
+ FragmentServletTest.class,
+ HelpServerInterrupt.class,
+ HelpServerBinding.class,
+ HtmlCoderTest.class,
+ TocZipTest.class
+})
+public class AllWebappTests {
}
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java
index 59a459c3f..eca959685 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/ParallelServerAccessTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2015 IBM Corporation and others.
+ * Copyright (c) 2010, 2016 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
@@ -14,13 +14,11 @@ package org.eclipse.ua.tests.help.webapp;
import java.io.InputStream;
import java.net.URL;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.help.internal.server.WebappManager;
import org.eclipse.ua.tests.help.util.LoadServletUtil;
+import junit.framework.TestCase;
+
/**
* Test the performance of the help server without launching the Help UI
* Note, this test has been contributed to Equinox, see Bug 362511
@@ -28,13 +26,6 @@ import org.eclipse.ua.tests.help.util.LoadServletUtil;
*/
public class ParallelServerAccessTest extends TestCase {
-
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ParallelServerAccessTest.class);
- }
@Override
protected void setUp() throws Exception {
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/AllWebappServiceTests.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/AllWebappServiceTests.java
index dc2a167f8..5a12012a2 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/AllWebappServiceTests.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/service/AllWebappServiceTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2016 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
@@ -10,32 +10,23 @@
*******************************************************************************/
package org.eclipse.ua.tests.help.webapp.service;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests utility classes and servlets used in Web Application
*/
-public class AllWebappServiceTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite(
- "org.eclipse.ua.tests.help.AllWebappServiceTests");
- //$JUnit-BEGIN$
- suite.addTestSuite(AdvancedSearchServiceTest.class);
- suite.addTestSuite(ContentServiceTest.class);
- suite.addTestSuite(ContextServiceTest.class);
- suite.addTestSuite(ExtensionServiceTest.class);
- suite.addTestSuite(IndexFragmentServiceTest.class);
- suite.addTestSuite(IndexServiceTest.class);
- suite.addTestSuite(SearchServiceTest.class);
- suite.addTestSuite(TocFragmentServiceTest.class);
- suite.addTestSuite(TocServiceTest.class);
- //$JUnit-END$
- return suite;
- }
-
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ AdvancedSearchServiceTest.class,
+ ContentServiceTest.class,
+ ContextServiceTest.class,
+ ExtensionServiceTest.class,
+ IndexFragmentServiceTest.class,
+ IndexServiceTest.class,
+ SearchServiceTest.class,
+ TocFragmentServiceTest.class,
+ TocServiceTest.class
+})
+public class AllWebappServiceTests {
}

Back to the top