diff options
author | Szymon Brandys | 2010-05-10 09:44:57 +0000 |
---|---|---|
committer | Szymon Brandys | 2010-05-10 09:44:57 +0000 |
commit | dd59ad39fecae0f5c66764f6e52517397d12e268 (patch) | |
tree | 69d18b70982f7b0e1535b0dab646512a7246c7d0 /tests/org.eclipse.team.tests.core | |
parent | 52741963d9bc96d998c210ced19ef0ba98ec9a0a (diff) | |
download | eclipse.platform.team-dd59ad39fecae0f5c66764f6e52517397d12e268.tar.gz eclipse.platform.team-dd59ad39fecae0f5c66764f6e52517397d12e268.tar.xz eclipse.platform.team-dd59ad39fecae0f5c66764f6e52517397d12e268.zip |
bug 312217 - Restore CompareRevisionAction#findReusableCompareEditor(CompareEditorInput , IWorkbenchPage)
Diffstat (limited to 'tests/org.eclipse.team.tests.core')
2 files changed, 72 insertions, 1 deletions
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/AllTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/AllTests.java index b9ec67523..06ffb66ad 100644 --- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/AllTests.java +++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/AllTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2010 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 @@ -24,6 +24,7 @@ public class AllTests extends TestCase { public static Test suite() { TestSuite suite = new TestSuite(AllTests.class.getName()); suite.addTest(Bug_217673.suite()); + suite.addTest(DoNotRemoveTest.suite()); return suite; } } diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java new file mode 100644 index 000000000..e35c8c8af --- /dev/null +++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/core/regression/DoNotRemoveTest.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2010 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.team.tests.core.regression; + +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.eclipse.compare.CompareConfiguration; +import org.eclipse.team.core.synchronize.SyncInfo; +import org.eclipse.team.internal.ui.Utils; +import org.eclipse.team.internal.ui.actions.CompareRevisionAction; +import org.eclipse.team.tests.core.TeamTest; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchPage; + +public class DoNotRemoveTest extends TeamTest { + + /** + * Tests + * {@link Utils#updateLabels(org.eclipse.team.core.synchronize.SyncInfo, org.eclipse.compare.CompareConfiguration)} + */ + public void test_Utils_updateLabels() { + try { + Method method = Utils.class.getMethod("updateLabels", new Class[] { + SyncInfo.class, CompareConfiguration.class }); + assertEquals(Modifier.STATIC | Modifier.PUBLIC, + method.getModifiers()); + assertEquals(Void.TYPE, method.getReturnType()); + } catch (SecurityException e) { + fail("test_Utils_updateLabels", e); + } catch (NoSuchMethodException e) { + fail("test_Utils_updateLabels", e); + } + } + + /** + * Tests + * {@link CompareRevisionAction#findReusableCompareEditor(IWorkbenchPage)} + */ + public void testBug312217() { + try { + Method method = CompareRevisionAction.class.getMethod( + "findReusableCompareEditor", + new Class[] { IWorkbenchPage.class }); + assertEquals(Modifier.STATIC | Modifier.PUBLIC, + method.getModifiers()); + assertEquals(IEditorPart.class, method.getReturnType()); + } catch (SecurityException e) { + fail("testBug312217", e); + } catch (NoSuchMethodException e) { + fail("testBug312217", e); + } + } + + public static Test suite() { + return new TestSuite(DoNotRemoveTest.class); + } + +} |