diff options
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.ui.tests')
-rw-r--r-- | build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCProjectPlatformPage.java | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCProjectPlatformPage.java b/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCProjectPlatformPage.java deleted file mode 100644 index 9f63f824efd..00000000000 --- a/build/org.eclipse.cdt.managedbuilder.ui.tests/src/org/eclipse/cdt/managedbuilder/ui/tests/TestCProjectPlatformPage.java +++ /dev/null @@ -1,128 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 Innoopract Informationssysteme GmbH 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: - * Innoopract - Initial API and implementation - *******************************************************************************/ -package org.eclipse.cdt.managedbuilder.ui.tests; - -import junit.framework.TestCase; - -import org.eclipse.cdt.managedbuilder.core.IProjectType; -import org.eclipse.cdt.managedbuilder.ui.tests.util.TestProjectType; -import org.eclipse.cdt.managedbuilder.ui.wizards.CDTProjectWizard; -import org.eclipse.cdt.managedbuilder.ui.wizards.CMainWizardPage; -import org.eclipse.cdt.managedbuilder.ui.wizards.CWizardHandler; -import org.eclipse.cdt.managedbuilder.ui.wizards.IToolChainListListener; -import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager; -import org.eclipse.cdt.managedbuilder.ui.wizards.NewModelProjectWizard; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IPath; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; - -/** - * Tests for the get/setSelectedProjectType() of CProjectPlatformPage. - * @author Elias Volanakis - */ -public class TestCProjectPlatformPage extends TestCase implements IToolChainListListener { - - //TODO: migrate to the new UI functionality - private CDTProjectWizard wizard; - private TestPage page; - private boolean currentState=false; - - protected void setUp() throws Exception { - MBSCustomPageManager.init(); - MBSCustomPageManager.loadExtensions(); - wizard = new CDTProjectWizard(); - page = new TestPage(wizard); - wizard.addPages(); - } - - protected void tearDown() throws Exception { - page.dispose(); - page = null; - wizard = null; - } - - - // testing methods - ////////////////// - - /* Test the new page, set selection, create page lifecycle. */ - public void testHandler1() throws Exception { - IProjectType pt = new TestProjectType(); - CWizardHandler h = new CWizardHandler("name", pt, null, null, this); - assertEquals(0, h.getToolChainsCount()); - /* - IToolchain tc = new Toolchain(new TestFolderInfo()); - IToolChain xz; - tc.setId("test1"); - h.addTc(tc); - // Test toolchain cannot be added - assertEquals(h.getToolChainsCount(), 1); - tc = new TestToolchain(); - h.addTc(tc); - assertEquals(h.getToolChainsCount(), 2); - IToolChain[] tcs = h.getSelectedToolChains(); - assertEquals(tcs.length, 33); - */ - } - - /* Test the new page, create page, set selection lifecycle. */ - public void testProject() throws Exception { - - IPath p = ResourcesPlugin.getWorkspace().getRoot().getLocation(); - /* - NewModelProjectWizard wiz = new CDTProjectWizard(); - /* - String s = System.getenv("TEMP"); - - System.out.println(s); - assertNotNull(wiz); - /* - IProject pr1 = wiz.createIProject("test1", null); - assertNotNull(pr1); - - IProject pr2 = wiz.createIProject("test2", p.append("test2")); - assertNotNull(pr2); - */ - } - - /* - * Tests that setting the selection to a projectType thats not on the list, - * is handled correctly. - */ - public void testSelectedProjectType3() throws Exception { - } - - - // helping methods and classes - ////////////////////////////// - - private Shell getShell() { - return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); - } - - class TestPage extends CMainWizardPage { - TestPage(CDTProjectWizard wizard) throws Exception { - super(CMainWizardPage.class.getName(), null); - } - IProjectType getFirstType() { - return null; //(IProjectType) projectTypes.get(0); - } - IProjectType getSecondType() { - return null; //(IProjectType) projectTypes.get(1); - } - } - - // methods of IToolChainListListener - public boolean isCurrent() { return currentState; } - public void toolChainListChanged(int count) {} -} |