Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hallgren2010-02-24 15:35:37 -0500
committerThomas Hallgren2010-02-24 15:35:37 -0500
commite659d374347a03d5662203090fa7e38a53bc2ff6 (patch)
tree34acb0905b37c66e9c6bb3687fb81096583f31d0 /bundles/org.eclipse.equinox.p2.tests.ui
parent67b79f8bfb9a919c49424b660d53f37240374bed (diff)
downloadrt.equinox.p2-e659d374347a03d5662203090fa7e38a53bc2ff6.tar.gz
rt.equinox.p2-e659d374347a03d5662203090fa7e38a53bc2ff6.tar.xz
rt.equinox.p2-e659d374347a03d5662203090fa7e38a53bc2ff6.zip
302201 : Unify the two query approaches used in p2, step 6.
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/AbstractQueryTest.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java2
3 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java
index 0b8edfe2a..b4d723261 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AbstractQueryTest.java
@@ -10,10 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.query;
+import org.eclipse.equinox.internal.p2.metadata.query.MatchQuery;
+
import org.eclipse.equinox.internal.p2.ui.ProvUI;
import org.eclipse.equinox.p2.operations.RepositoryTracker;
import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.MatchQuery;
import org.eclipse.equinox.p2.repository.IRepositoryManager;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java
index b07ca1574..c7b138990 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/AnyRequiredCapabilityTest.java
@@ -31,7 +31,7 @@ public class AnyRequiredCapabilityTest extends AbstractQueryTest {
List items = new ArrayList();
items.add(match);
items.add(noMatch);
- IQueryResult result = new ExpressionQuery(IInstallableUnit.class, requires.getMatches()).perform(items.iterator());
+ IQueryResult result = ExpressionQuery.create(requires.getMatches()).perform(items.iterator());
assertEquals("1.0", 1, queryResultSize(result));
assertEquals("1.1", match, result.iterator().next());
}
@@ -48,7 +48,7 @@ public class AnyRequiredCapabilityTest extends AbstractQueryTest {
metadataRepositoryManager.addRepository(location);
QueryableMetadataRepositoryManager manager = new QueryableMetadataRepositoryManager(ProvisioningUI.getDefaultUI(), false);
IRequirement requires = MetadataFactory.createRequiredCapability("org.eclipse.equinox.p2.iu", "test.bundle", ANY_VERSION, null, false, false);
- IQueryResult result = manager.query(new ExpressionQuery(IInstallableUnit.class, requires.getMatches()), getMonitor());
+ IQueryResult result = manager.query(ExpressionQuery.create(requires.getMatches()), getMonitor());
assertEquals("1.0", 1, queryResultSize(result));
IInstallableUnit iu = (IInstallableUnit) result.iterator().next();
assertEquals("1.1", "test.bundle", iu.getId());
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java
index a2d6d6cdd..3a18aa712 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/query/QueryDescriptorTest.java
@@ -9,6 +9,8 @@
******************************************************************************/
package org.eclipse.equinox.p2.tests.ui.query;
+import org.eclipse.equinox.internal.p2.metadata.query.MatchQuery;
+
import java.util.*;
import junit.framework.TestCase;
import org.eclipse.core.runtime.IProgressMonitor;

Back to the top