Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 30655 Details for
Bug 114810
Hardware and OS attributes not auto determined in New Bug Report wizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Test Case
patch-org.eclipse.mylar.bugzilla.tests.txt (text/plain), 3.80 KB, created by
Ian Bull
on 2005-11-25 19:59:56 EST
(
hide
)
Description:
Test Case
Filename:
MIME Type:
Creator:
Ian Bull
Created:
2005-11-25 19:59:56 EST
Size:
3.80 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylar.bugzilla.tests >Index: src/org/eclipse/mylar/bugzilla/tests/NewBugWizardTest.java >=================================================================== >RCS file: /home/technology/org.eclipse.mylar/org.eclipse.mylar.bugzilla.tests/src/org/eclipse/mylar/bugzilla/tests/NewBugWizardTest.java,v >retrieving revision 1.2 >diff -u -r1.2 NewBugWizardTest.java >--- src/org/eclipse/mylar/bugzilla/tests/NewBugWizardTest.java 18 Nov 2005 01:30:09 -0000 1.2 >+++ src/org/eclipse/mylar/bugzilla/tests/NewBugWizardTest.java 26 Nov 2005 00:47:41 -0000 >@@ -11,9 +11,16 @@ > > package org.eclipse.mylar.bugzilla.tests; > >+import java.io.File; >+import java.io.FileReader; >+import java.io.Reader; >+ > import junit.framework.TestCase; > >+import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.mylar.bugzilla.core.NewBugModel; >+import org.eclipse.mylar.bugzilla.core.internal.NewBugParser; > import org.eclipse.mylar.bugzilla.ui.wizard.AbstractWizardDataPage; > import org.eclipse.ui.PlatformUI; > >@@ -22,16 +29,51 @@ > */ > public class NewBugWizardTest extends TestCase { > >- public void testPlatformOptions() { >+ public void testPlatformOptions() throws Exception { >+ >+ File f = FileTool.getFileInPlugin(BugzillaTestPlugin.getDefault(), new Path("TestPages/cdt-page.html")); >+ >+ Reader in = new FileReader(f); >+ > NewBugModel model = new NewBugModel(); > AbstractWizardDataPage page = new TestWizardDataPage(); >+ >+ new NewBugParser(in).parseBugAttributes(model, true); // ** TRUE vs FALSE ** >+ > page.setPlatformOptions(model); > >- // TODO: uncomment and make it pass >-// String os = Platform.getOS(); >-// String platform = Platform.getOSArch(); >-// assertEquals(os, model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS)); >-// assertEquals(platform, model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_PLATFORM)); >+ String os = Platform.getOS(); >+ if ( os.equals("win32") ) >+ assertEquals("Windows All", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS).getValue()); >+ else if ( os.equals("solaris") ) >+ assertEquals("Solaris", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS).getValue()); >+ else if ( os.equals("qnx") ) >+ assertEquals("QNX-Photon", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS).getValue()); >+ else if ( os.equals("macosx") ) >+ assertEquals("MacOS X", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS).getValue()); >+ else if ( os.equals("linux")) >+ assertEquals("Linux", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS).getValue()); >+ else if ( os.equals("hpux")) >+ assertEquals("HP-UX", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS).getValue()); >+ else if ( os.equals("aix" )) >+ assertEquals("AIX", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_OS).getValue()); >+ >+ >+ String platform = Platform.getOSArch(); >+ >+ if ( platform.equals("x86")) >+ assertEquals("PC", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_PLATFORM).getValue()); >+ else if ( platform.equals("x86_64")) >+ assertEquals("PC", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_PLATFORM).getValue()); >+ else if ( platform.equals("ia64")) >+ assertEquals("PC", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_PLATFORM).getValue()); >+ else if ( platform.equals("ia64_32")) >+ assertEquals("PC", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_PLATFORM).getValue()); >+ else if ( platform.equals("sparc")) >+ assertEquals("Sun", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_PLATFORM).getValue()); >+ else if ( platform.equals("ppc")) >+ assertEquals("Power", model.getAttribute(AbstractWizardDataPage.ATTRIBUTE_PLATFORM).getValue()); >+ > } > > static class TestWizardDataPage extends AbstractWizardDataPage { >@@ -40,5 +82,6 @@ > super("", "", "", PlatformUI.getWorkbench()); > } > } >+ > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 114810
:
30104
| 30655