Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-11-20 16:09:11 +0000
committerJean Michel-Lemieux2003-11-20 16:09:11 +0000
commit3a98c2f040d50ea2af11c5a0d320c74adfd7b48c (patch)
treefff35760b0438302bb8a37a5724788177c0e2186
parentebc6a11c63132547b849d7c31abf2b59318b913d (diff)
downloadeclipse.platform.team-3a98c2f040d50ea2af11c5a0d320c74adfd7b48c.tar.gz
eclipse.platform.team-3a98c2f040d50ea2af11c5a0d320c74adfd7b48c.tar.xz
eclipse.platform.team-3a98c2f040d50ea2af11c5a0d320c74adfd7b48c.zip
Added UI test setup for enabling the decorators during tests.
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java5
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java22
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CVSUITestCase.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CommandTests.java2
5 files changed, 27 insertions, 6 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java
index 1cb4cd81a..0df86a5ed 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/AllTests.java
@@ -31,7 +31,7 @@ public class AllTests extends EclipseTest {
suite.addTest(AllTestsProvider.suite());
suite.addTest(AllTestsTeamSubscriber.suite());
suite.addTest(AllUITests.suite());
- return new CVSTestSetup(suite);
+ return new CVSUITestSetup(suite);
}
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java
index 30bb1bb0c..63425949e 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSTestSetup.java
@@ -14,8 +14,7 @@ import java.io.*;
import junit.extensions.TestSetup;
import junit.framework.Test;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.*;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.connection.CVSCommunicationException;
import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
@@ -164,7 +163,7 @@ public class CVSTestSetup extends TestSetup {
executeRemoteCommand(repository, "cvs -d " + repoRoot + " init");
}
- public void setUp() throws CVSException {
+ public void setUp() throws CoreException {
if (repository == null) {
repository = setupRepository(REPOSITORY_LOCATION);
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java
new file mode 100644
index 000000000..8222b0c98
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/CVSUITestSetup.java
@@ -0,0 +1,22 @@
+package org.eclipse.team.tests.ccvs.core;
+
+import junit.framework.Test;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
+import org.eclipse.ui.PlatformUI;
+
+public class CVSUITestSetup extends CVSTestSetup implements Test {
+
+ public CVSUITestSetup(Test test) {
+ super(test);
+ }
+
+ /* (non-Javadoc)
+ * @see junit.extensions.TestSetup#setUp()
+ */
+ public void setUp() throws CoreException {
+ super.setUp();
+ PlatformUI.getWorkbench().getDecoratorManager().setEnabled(CVSUIPlugin.DECORATOR_ID, true);
+ }
+}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CVSUITestCase.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CVSUITestCase.java
index 4a08ec9bf..dd850a1e0 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CVSUITestCase.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CVSUITestCase.java
@@ -87,7 +87,7 @@ public class CVSUITestCase extends LoggingTestCase {
testWindows = new ArrayList(3);
}
- public void setUp() throws CVSException {
+ public void setUp() throws CoreException{
super.setUp();
testRepository = CVSTestSetup.repository;
testWindow = openTestWindow();
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CommandTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CommandTests.java
index 7613bf463..b850dd000 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CommandTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/old/CommandTests.java
@@ -49,7 +49,7 @@ public class CommandTests extends CVSUITestCase {
return new BenchmarkTestSetup(new TestSuite(CommandTests.class));
}
- public void setUp() throws CVSException {
+ public void setUp() throws CoreException {
super.setUp();
try {
baseName = Utils.makeUniqueName(null, "thisproject", null);

Back to the top