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/intro/org
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/intro/org')
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/AllIntroTests.java30
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/AllOtherTests.java25
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/NormalizeWhitespaceTest.java11
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/ReopenStateTest.java11
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java24
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java13
-rw-r--r--org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java15
7 files changed, 29 insertions, 100 deletions
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/AllIntroTests.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/AllIntroTests.java
index 6865c32dd..13996ab72 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/AllIntroTests.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/AllIntroTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2012 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
@@ -10,33 +10,19 @@
*******************************************************************************/
package org.eclipse.ua.tests.intro;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.eclipse.ua.tests.intro.anchors.ExtensionReorderingTest;
import org.eclipse.ua.tests.intro.contentdetect.ContentDetectorTest;
import org.eclipse.ua.tests.intro.other.AllOtherTests;
import org.eclipse.ua.tests.intro.parser.AllParserTests;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests all intro (welcome) functionality (automated).
*/
-public class AllIntroTests extends TestSuite {
-
- /*
- * Returns the entire test suite.
- */
- public static Test suite() {
- return new AllIntroTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllIntroTests() {
- addTest(AllParserTests.suite());
- addTest(ContentDetectorTest.suite());
- addTestSuite(ExtensionReorderingTest.class);
- addTest(AllOtherTests.suite());
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ AllParserTests.class, ContentDetectorTest.class,ExtensionReorderingTest.class,AllOtherTests.class
+})
+public class AllIntroTests {
}
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/AllOtherTests.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/AllOtherTests.java
index 282096307..5dbd58af6 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/AllOtherTests.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/AllOtherTests.java
@@ -10,26 +10,15 @@
*******************************************************************************/
package org.eclipse.ua.tests.intro.other;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests all intro parser functionality (automated).
*/
-public class AllOtherTests extends TestSuite {
-
- /*
- * Returns the test suite.
- */
- public static Test suite() {
- return new AllOtherTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllOtherTests() {
- addTest(ReopenStateTest.suite());
- addTest(NormalizeWhitespaceTest.suite());
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ReopenStateTest.class, NormalizeWhitespaceTest.class
+})
+public class AllOtherTests {
}
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/NormalizeWhitespaceTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/NormalizeWhitespaceTest.java
index 1790470fd..2d7c8fa87 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/NormalizeWhitespaceTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/NormalizeWhitespaceTest.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
@@ -12,22 +12,13 @@ package org.eclipse.ua.tests.intro.other;
import org.eclipse.ui.internal.intro.impl.util.StringUtil;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
/*
* Tests whitespace normalization used by SWT presentation.
*/
public class NormalizeWhitespaceTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(NormalizeWhitespaceTest.class);
- }
-
public void testNullString() {
assertNull(StringUtil.normalizeWhiteSpace(null));
}
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/ReopenStateTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/ReopenStateTest.java
index 15c50b43f..791fb0191 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/ReopenStateTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/other/ReopenStateTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -12,22 +12,13 @@ package org.eclipse.ua.tests.intro.other;
import org.eclipse.ui.internal.intro.impl.util.ReopenUtil;
-import junit.framework.Test;
import junit.framework.TestCase;
-import junit.framework.TestSuite;
/*
* Tests the intro parser on valid intro content.
*/
public class ReopenStateTest extends TestCase {
- /*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ReopenStateTest.class);
- }
-
public void testReopenState() {
ReopenUtil.setReopenPreference(true);
assertTrue(ReopenUtil.isReopenPreference());
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java
index a77795704..e446e2b28 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/AllParserTests.java
@@ -10,25 +10,15 @@
*******************************************************************************/
package org.eclipse.ua.tests.intro.parser;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
/*
* Tests all intro parser functionality (automated).
*/
-public class AllParserTests extends TestSuite {
-
- /*
- * Returns the test suite.
- */
- public static Test suite() {
- return new AllParserTests();
- }
-
- /*
- * Constructs a new test suite.
- */
- public AllParserTests() {
- addTest(ValidTest.suite());
- }
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ValidTest.class
+})
+public class AllParserTests {
}
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java
index bc571d3dc..db67da739 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/ValidTest.java
@@ -15,10 +15,6 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.ui.internal.HelpUIPlugin;
@@ -31,19 +27,14 @@ import org.eclipse.ui.internal.intro.impl.model.loader.ExtensionPointManager;
import org.junit.Assert;
import org.osgi.framework.Bundle;
+import junit.framework.TestCase;
+
/*
* Tests the intro parser on valid intro content.
*/
public class ValidTest extends TestCase {
/*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(ValidTest.class);
- }
-
- /*
* Ensure that org.eclipse.help.ui is started. It contributes extra content
* filtering that is used by this test. See UIContentFilterProcessor.
*/
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java
index 0a167ac0a..2d505da0b 100644
--- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java
+++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/util/IntroModelSerializerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 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
@@ -19,10 +19,6 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;
import org.eclipse.help.ui.internal.HelpUIPlugin;
@@ -38,6 +34,8 @@ import org.eclipse.ui.internal.intro.impl.presentations.BrowserIntroPartImplemen
import org.eclipse.ui.intro.config.IIntroContentProvider;
import org.eclipse.ui.intro.config.IIntroContentProviderSite;
+import junit.framework.TestCase;
+
/*
* A utility for regenerating the _expected.txt files that contain the expected
* output for the intro model when serialized. This reads all the intro content from
@@ -58,13 +56,6 @@ import org.eclipse.ui.intro.config.IIntroContentProviderSite;
public class IntroModelSerializerTest extends TestCase {
/*
- * Returns an instance of this Test.
- */
- public static Test suite() {
- return new TestSuite(IntroModelSerializerTest.class);
- }
-
- /*
* Ensure that org.eclipse.help.ui is started. It contributes extra
* content filtering that is used by this test. See
* UIContentFilterProcessor.

Back to the top