diff options
author | Susan Franklin | 2008-11-25 23:54:48 +0000 |
---|---|---|
committer | Susan Franklin | 2008-11-25 23:54:48 +0000 |
commit | 395ef2f369288e53f3b2616de8a15e851bf1b439 (patch) | |
tree | 44f53102d070fa8d2d2c0f5d1d2a428a0a4614ae /bundles/org.eclipse.equinox.p2.tests.ui | |
parent | ec0e090f05fb7f8c8df9adae06f6f970d1795370 (diff) | |
download | rt.equinox.p2-395ef2f369288e53f3b2616de8a15e851bf1b439.tar.gz rt.equinox.p2-395ef2f369288e53f3b2616de8a15e851bf1b439.tar.xz rt.equinox.p2-395ef2f369288e53f3b2616de8a15e851bf1b439.zip |
Bug 232632 - [ui] when showing latest versions only, shouldn't show features older than those you have installed
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests.ui')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUCollectorTest.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUCollectorTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUCollectorTest.java index 23e845d44..59ada7a88 100644 --- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUCollectorTest.java +++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AvailableIUCollectorTest.java @@ -14,12 +14,10 @@ import java.util.*; import org.eclipse.equinox.internal.p2.ui.model.CategoryElement; import org.eclipse.equinox.internal.p2.ui.model.IIUElement; import org.eclipse.equinox.internal.p2.ui.query.AvailableIUCollector; +import org.eclipse.equinox.internal.provisional.p2.engine.IProfile; import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit; import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery; -import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery; -import org.eclipse.equinox.internal.provisional.p2.query.Collector; import org.eclipse.equinox.internal.provisional.p2.query.Query; -import org.eclipse.equinox.internal.provisional.p2.ui.ElementQueryDescriptor; import org.eclipse.equinox.p2.tests.MockQueryable; import org.osgi.framework.Version; @@ -121,13 +119,13 @@ public class AvailableIUCollectorTest extends QueryTest { * Tests hiding installed IUs. */ public void testHideInstalled() { + IProfile profile = createProfile("TestProfile"); + AvailableIUCollector collector = createCollector(true); IInstallableUnit installed = createIU("installed"); IInstallableUnit notInstalled = createIU("notInstalled"); - Query installedQuery = new InstallableUnitQuery("installed"); - ElementQueryDescriptor installedDescriptor = new ElementQueryDescriptor(new MockQueryable(installed), installedQuery, new Collector()); - assertTrue("1.0", installedDescriptor.isComplete()); - collector.hideInstalledIUs(installedDescriptor); + install(profile, new IInstallableUnit[] {installed}, true, createPlanner(), createEngine()); + collector.markInstalledIUs(profile, true); //now feed in the installed and non-installed units, and the installed unit should be ignored. collector.accept(installed); |