Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Becker2016-10-14 06:40:41 +0000
committerGerrit Code Review @ Eclipse.org2016-10-21 16:56:27 +0000
commit3630c390facf5251fbc3fc4e7c2b17bae70a402a (patch)
tree2cc6606c6e78889b5cc9d1402819150a67e7192a /org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn
parent6acaf16af156b3fea92e8e0c4523ae6e3e1cc3ef (diff)
downloadorg.eclipse.mylyn.tasks-3630c390facf5251fbc3fc4e7c2b17bae70a402a.tar.gz
org.eclipse.mylyn.tasks-3630c390facf5251fbc3fc4e7c2b17bae70a402a.tar.xz
org.eclipse.mylyn.tasks-3630c390facf5251fbc3fc4e7c2b17bae70a402a.zip
503109: create ManagedSuite for junit4
Change-Id: I439c781fdce1524b69450360b8d67878507cf3ef Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=503109
Diffstat (limited to 'org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn')
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java94
1 files changed, 40 insertions, 54 deletions
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
index 2de3cfef5..e7dd3fd50 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/AllTracTests.java
@@ -11,27 +11,13 @@
package org.eclipse.mylyn.trac.tests;
-import java.util.List;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil;
-import org.eclipse.mylyn.commons.sdk.util.CommonTestUtil.PrivilegeLevel;
+import org.eclipse.mylyn.commons.sdk.util.ManagedSuite;
import org.eclipse.mylyn.commons.sdk.util.ManagedTestSuite;
import org.eclipse.mylyn.commons.sdk.util.TestConfiguration;
-import org.eclipse.mylyn.commons.sdk.util.TestConfiguration.TestKind;
-import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
-import org.eclipse.mylyn.trac.tests.core.TracAttachmentHandlerTest;
-import org.eclipse.mylyn.trac.tests.core.TracRepositoryConnectorTest;
-import org.eclipse.mylyn.trac.tests.core.TracRepositoryConnectorWebTest;
-import org.eclipse.mylyn.trac.tests.core.TracRepositoryQueryTest;
-import org.eclipse.mylyn.trac.tests.core.TracTaskDataHandlerXmlRpcTest;
-import org.eclipse.mylyn.trac.tests.core.TracUtilTest;
-import org.eclipse.mylyn.trac.tests.support.TracFixture;
-import org.eclipse.mylyn.trac.tests.support.TracTestCleanupUtil;
-import org.eclipse.mylyn.trac.tests.ui.TracHyperlinkUtilTest;
-import org.eclipse.mylyn.trac.tests.ui.TracRepositorySettingsPageTest;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
/**
* @author Mik Kersten
@@ -43,10 +29,10 @@ public class AllTracTests {
if (CommonTestUtil.fixProxyConfiguration()) {
CommonTestUtil.dumpSystemInfo(System.err);
}
-
+ TestConfiguration testConfiguration = ManagedSuite.getTestConfigurationOrCreateDefault();
TestSuite suite = new ManagedTestSuite(AllTracTests.class.getName());
-// addTests(suite, TestConfiguration.getDefault());
- addEmptyTest(suite, TestConfiguration.getDefault());
+// addTests(suite, testConfiguration);
+ addEmptyTest(suite, testConfiguration);
return suite;
}
@@ -61,38 +47,38 @@ public class AllTracTests {
suite.addTestSuite(EmptyTest.class);
}
- public static void addTests(TestSuite suite, TestConfiguration configuration) {
- suite.addTest(AllTracHeadlessStandaloneTests.suite(configuration));
- suite.addTestSuite(TracUtilTest.class);
- suite.addTestSuite(TracHyperlinkUtilTest.class);
-
- if (!configuration.isLocalOnly()) {
- suite.addTestSuite(TracRepositoryQueryTest.class);
- suite.addTestSuite(TracRepositorySettingsPageTest.class);
- // network tests
- List<TracFixture> fixtures = configuration.discover(TracFixture.class, "trac");
- for (TracFixture fixture : fixtures) {
- if (!fixture.hasTag(TracFixture.TAG_MISC)) {
- addTests(suite, configuration, fixture);
- }
- }
- }
- }
-
- protected static void addTests(TestSuite suite, TestConfiguration configuration, TracFixture fixture) {
- fixture.createSuite(suite);
- if (configuration.hasKind(TestKind.INTEGRATION) && !configuration.isLocalOnly()
- && CommonTestUtil.hasCredentials(PrivilegeLevel.ADMIN)) {
- fixture.add(TracTestCleanupUtil.class);
- }
- fixture.add(TracRepositoryConnectorTest.class);
- if (fixture.getAccessMode() == Version.XML_RPC) {
- fixture.add(TracTaskDataHandlerXmlRpcTest.class);
- fixture.add(TracAttachmentHandlerTest.class);
- } else {
- fixture.add(TracRepositoryConnectorWebTest.class);
- }
- fixture.done();
- }
+// public static void addTests(TestSuite suite, TestConfiguration configuration) {
+// suite.addTest(AllTracHeadlessStandaloneTests.suite(configuration));
+// suite.addTestSuite(TracUtilTest.class);
+// suite.addTestSuite(TracHyperlinkUtilTest.class);
+//
+// if (!configuration.isLocalOnly()) {
+// suite.addTestSuite(TracRepositoryQueryTest.class);
+// suite.addTestSuite(TracRepositorySettingsPageTest.class);
+// // network tests
+// List<TracFixture> fixtures = configuration.discover(TracFixture.class, "trac");
+// for (TracFixture fixture : fixtures) {
+// if (!fixture.hasTag(TracFixture.TAG_MISC)) {
+// addTests(suite, configuration, fixture);
+// }
+// }
+// }
+// }
+//
+// protected static void addTests(TestSuite suite, TestConfiguration configuration, TracFixture fixture) {
+// fixture.createSuite(suite);
+// if (configuration.hasKind(TestKind.INTEGRATION) && !configuration.isLocalOnly()
+// && CommonTestUtil.hasCredentials(PrivilegeLevel.ADMIN)) {
+// fixture.add(TracTestCleanupUtil.class);
+// }
+// fixture.add(TracRepositoryConnectorTest.class);
+// if (fixture.getAccessMode() == Version.XML_RPC) {
+// fixture.add(TracTaskDataHandlerXmlRpcTest.class);
+// fixture.add(TracAttachmentHandlerTest.class);
+// } else {
+// fixture.add(TracRepositoryConnectorWebTest.class);
+// }
+// fixture.done();
+// }
} \ No newline at end of file

Back to the top