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 188089 Details for
Bug 336015
[ui] ProvisioningOperationWizard will not use ProfileChangeOperation
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]
TestCase
ProvisioningOperationWizard.patch (text/plain), 3.32 KB, created by
Matthew Piggott
on 2011-02-01 16:13:49 EST
(
hide
)
Description:
TestCase
Filename:
MIME Type:
Creator:
Matthew Piggott
Created:
2011-02-01 16:13:49 EST
Size:
3.32 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.p2.tests.ui >Index: src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.equinox/p2/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java,v >retrieving revision 1.22 >diff -u -r1.22 InstallWizardTest.java >--- src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java 2 Mar 2010 17:22:11 -0000 1.22 >+++ src/org/eclipse/equinox/p2/tests/ui/dialogs/InstallWizardTest.java 1 Feb 2011 21:03:14 -0000 >@@ -10,18 +10,17 @@ > *******************************************************************************/ > package org.eclipse.equinox.p2.tests.ui.dialogs; > >-import org.eclipse.equinox.p2.metadata.MetadataFactory; >-import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription; >- >+import java.lang.reflect.Field; > import java.util.ArrayList; >+import java.util.Collection; > import org.eclipse.equinox.internal.p2.metadata.License; > import org.eclipse.equinox.internal.p2.ui.ProvUI; > import org.eclipse.equinox.internal.p2.ui.dialogs.*; > import org.eclipse.equinox.internal.p2.ui.model.IIUElement; > import org.eclipse.equinox.internal.p2.ui.viewers.DeferredQueryContentProvider; > import org.eclipse.equinox.p2.metadata.*; >-import org.eclipse.equinox.p2.operations.InstallOperation; >-import org.eclipse.equinox.p2.operations.ProfileModificationJob; >+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription; >+import org.eclipse.equinox.p2.operations.*; > import org.eclipse.equinox.p2.ui.LoadMetadataRepositoryJob; > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.wizard.IWizardPage; >@@ -99,6 +98,41 @@ > } > } > >+ public void testInstallWizard() throws Exception { >+ ArrayList<IInstallableUnit> iusInvolved = new ArrayList<IInstallableUnit>(); >+ iusInvolved.add(toInstall); >+ InstallOperation op = new MyNewInstallOperation(getSession(), iusInvolved); >+ op.setProfileId(TESTPROFILE); >+ PreselectedIUInstallWizard wizard = new PreselectedIUInstallWizard(getProvisioningUI(), op, iusInvolved, null); >+ ProvisioningWizardDialog dialog = new ProvisioningWizardDialog(ProvUI.getDefaultParentShell(), wizard); >+ dialog.setBlockOnOpen(false); >+ dialog.open(); >+ ProfileModificationJob longOp = null; >+ >+ try { >+ SelectableIUsPage page1 = (SelectableIUsPage) wizard.getPage(SELECTION_PAGE); >+ // should already have a plan >+ assertTrue("1.0", page1.isPageComplete()); >+ // simulate the next button by getting next page and showing >+ InstallWizardPage page = (InstallWizardPage) page1.getNextPage(); >+ >+ // get the operation >+ Field opField = ResolutionResultsWizardPage.class.getDeclaredField("resolvedOperation"); >+ opField.setAccessible(true); >+ assertTrue("Expected instance of MyNewInstallOperation", opField.get(page) instanceof MyNewInstallOperation); >+ } finally { >+ dialog.getShell().close(); >+ if (longOp != null) >+ longOp.cancel(); >+ } >+ } >+ >+ private static class MyNewInstallOperation extends InstallOperation { >+ public MyNewInstallOperation(ProvisioningSession session, Collection<IInstallableUnit> toInstall) { >+ super(session, toInstall); >+ } >+ } >+ > /** > * Tests the wizard > */
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
Flags:
pascal
:
review+
Actions:
View
|
Diff
Attachments on
bug 336015
: 188089 |
188261