diff options
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java deleted file mode 100644 index 12bea4912..000000000 --- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/NewBugWizardTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2007 Mylyn project committers 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 - *******************************************************************************/ - -package org.eclipse.mylyn.bugzilla.tests; - -import junit.framework.TestCase; - -import org.eclipse.core.runtime.Platform; -import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttributeFactory; -import org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin; -import org.eclipse.mylyn.internal.bugzilla.core.BugzillaReportElement; -import org.eclipse.mylyn.internal.bugzilla.core.BugzillaRepositoryConnector; -import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; -import org.eclipse.mylyn.tasks.core.RepositoryTaskData; -import org.eclipse.mylyn.tasks.core.TaskRepository; - -/** - * @author Mik Kersten - * @author Ian Bull - */ -public class NewBugWizardTest extends TestCase { - - public void testPlatformOptions() throws Exception { - - RepositoryTaskData newReport = new RepositoryTaskData(new BugzillaAttributeFactory(), - BugzillaCorePlugin.REPOSITORY_KIND, IBugzillaConstants.TEST_BUGZILLA_220_URL, "1"); - - TaskRepository repository = new TaskRepository(BugzillaCorePlugin.REPOSITORY_KIND, - IBugzillaConstants.TEST_BUGZILLA_220_URL); - BugzillaRepositoryConnector.setupNewBugAttributes(repository, newReport); - BugzillaCorePlugin.getDefault().setPlatformOptions(newReport); - - String os = Platform.getOS(); - if (os.equals("win32")) - assertEquals("Windows", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); - else if (os.equals("solaris")) - assertEquals("Solaris", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); - else if (os.equals("qnx")) - assertEquals("QNX-Photon", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); - else if (os.equals("macosx")) - assertEquals("Mac OS", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); - else if (os.equals("linux")) - assertEquals("Linux", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); - else if (os.equals("hpux")) - assertEquals("HP-UX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); - else if (os.equals("aix")) - assertEquals("AIX", newReport.getAttribute(BugzillaReportElement.OP_SYS.getKeyString()).getValue()); - - String platform = Platform.getOSArch(); - if (platform.equals("x86")) { - if (os.equals("macosx")) - assertEquals("Macintosh", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()) - .getValue()); - else - assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); - } else if (platform.equals("x86_64")) - assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); - else if (platform.equals("ia64")) - assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); - else if (platform.equals("ia64_32")) - assertEquals("PC", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); - else if (platform.equals("sparc")) - assertEquals("Sun", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()).getValue()); - else if (platform.equals("ppc")) { - if (os.equals("macosx")) - assertEquals("Macintosh", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()) - .getValue()); - else - assertEquals("Power", newReport.getAttribute(BugzillaReportElement.REP_PLATFORM.getKeyString()) - .getValue()); - } - } - -} |