Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-09-08 16:46:37 -0400
committerMichael Valenta2003-09-08 16:46:37 -0400
commite27dfe342caaf2f8713211f00c9e0932003717a2 (patch)
tree04192032d3d0cd290d79c4ed54c88b9d0ec2c462
parent679f67c92a8fd2985122c8a63432d3a098cb272c (diff)
downloadeclipse.platform.team-e27dfe342caaf2f8713211f00c9e0932003717a2.tar.gz
eclipse.platform.team-e27dfe342caaf2f8713211f00c9e0932003717a2.tar.xz
eclipse.platform.team-e27dfe342caaf2f8713211f00c9e0932003717a2.zip
*** empty log message ***
-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/ui/unit/AllUIUnitTests.java34
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java21
3 files changed, 57 insertions, 0 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 ce45de614..f64c6c6c0 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
@@ -15,6 +15,7 @@ import junit.framework.TestSuite;
import org.eclipse.team.tests.ccvs.core.cvsresources.AllTestsCVSResources;
import org.eclipse.team.tests.ccvs.core.provider.AllTestsProvider;
import org.eclipse.team.tests.ccvs.core.subscriber.AllTestsTeamSubscriber;
+import org.eclipse.team.tests.ccvs.ui.unit.AllUIUnitTests;
public class AllTests extends EclipseTest {
@@ -42,6 +43,7 @@ public class AllTests extends EclipseTest {
suite.addTest(AllTestsCVSResources.suite());
suite.addTest(AllTestsProvider.suite());
suite.addTest(AllTestsTeamSubscriber.suite());
+ suite.addTest(AllUIUnitTests.suite());
return new CVSTestSetup(suite);
}
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/AllUIUnitTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/AllUIUnitTests.java
new file mode 100644
index 000000000..40eaa011a
--- /dev/null
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/AllUIUnitTests.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.tests.ccvs.ui.unit;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.team.tests.ccvs.core.EclipseTest;
+
+public class AllUIUnitTests extends EclipseTest {
+
+ public AllUIUnitTests() {
+ super();
+ }
+
+ public AllUIUnitTests(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+ suite.addTest(CheckoutOperationTests.suite());
+ return suite;
+ }
+
+}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java
index 9f211e355..47058de5f 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/unit/CheckoutOperationTests.java
@@ -26,6 +26,7 @@ import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
import org.eclipse.team.internal.ccvs.ui.operations.CVSOperation;
import org.eclipse.team.internal.ccvs.ui.operations.CheckoutMultipleProjectsOperation;
+import org.eclipse.team.internal.ccvs.ui.operations.CheckoutSingleProjectOperation;
import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
@@ -120,6 +121,26 @@ public class CheckoutOperationTests extends EclipseTest {
} catch (InterruptedException e) {
fail("Operation should not have been interrupted");
}
+ }
+
+ public void testCheckoutAs() throws TeamException, CoreException, IOException {
+ IProject project = createProject("testCheckoutAs", new String[] { "changed.txt", "deleted.txt", "folder1/", "folder1/a.txt" });
+ IProject copy = ResourcesPlugin.getWorkspace().getRoot().getProject(project.getName() + "-copy");
+
+ // checkout the project to the default location
+ try {
+ CVSOperation op = new CheckoutSingleProjectOperation(
+ null /* shell */,
+ (ICVSRemoteFolder)CVSWorkspaceRoot.getRemoteResourceFor(project),
+ copy,
+ null /*target location*/,
+ false);
+ op.setCVSRunnableContext(new HeadlessCVSRunnableContext());
+ op.run();
+ } catch (InterruptedException e) {
+ fail("Operation should not have been interrupted");
+ }
+ assertEquals(project, copy);
}
}

Back to the top