Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hallgren2010-02-19 22:46:40 +0000
committerThomas Hallgren2010-02-19 22:46:40 +0000
commit3a38ea838308bd6743b26cf6557076dbb31a2e11 (patch)
treee06dc5237390931f4745a4abd46c55fb715a5db7 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core
parentfe8721a60306de05a7015f4b010a7ee520e48fab (diff)
downloadrt.equinox.p2-3a38ea838308bd6743b26cf6557076dbb31a2e11.tar.gz
rt.equinox.p2-3a38ea838308bd6743b26cf6557076dbb31a2e11.tar.xz
rt.equinox.p2-3a38ea838308bd6743b26cf6557076dbb31a2e11.zip
303383 : We don't need both QLMatchQuery and ExpressionQuery and some things related to bug 302201 : Unify the two query approaches used in p2
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/CompoundQueryableTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java
index bea6a9cdc..d067dde5f 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/AggregateQueryTest.java
@@ -29,7 +29,7 @@ public class AggregateQueryTest extends TestCase {
}
public void testEmptyCompositeQuery() {
- PipedQuery query = new PipedQuery(new IQuery[0]);
+ IQuery query = PipedQuery.createPipe(new IQuery[0]);
query.perform(getABCDE().iterator());
// We should not throw an exception. No guarantee on what perform
// will return in this case
@@ -114,11 +114,11 @@ public class AggregateQueryTest extends TestCase {
}
};
- PipedQuery compoundQuery = new PipedQuery(getLatest, getAllBut3);
+ IQuery compoundQuery = PipedQuery.createPipe(getLatest, getAllBut3);
IQueryResult result = compoundQuery.perform(get123().iterator());
assertEquals(0, AbstractProvisioningTest.queryResultSize(result));
- compoundQuery = new PipedQuery(getAllBut3, getLatest);
+ compoundQuery = PipedQuery.createPipe(getAllBut3, getLatest);
result = compoundQuery.perform(get123().iterator());
assertEquals(1, AbstractProvisioningTest.queryResultSize(result));
assertEquals("2", result.iterator().next());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/CompoundQueryableTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/CompoundQueryableTest.java
index 0b324cac8..766acce87 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/CompoundQueryableTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/CompoundQueryableTest.java
@@ -278,7 +278,7 @@ public class CompoundQueryableTest extends TestCase {
CompoundQueryable cQueryable1 = new CompoundQueryable(queryable3, queryable2);
CompoundQueryable cQueryable = new CompoundQueryable(cQueryable1, queryable1);
CompoundQueryTestProgressMonitor monitor = new CompoundQueryTestProgressMonitor();
- IQueryResult queryResult = cQueryable.query(new PipedQuery(contextQuery, greatestNumberQuery), monitor);
+ IQueryResult queryResult = cQueryable.query(PipedQuery.createPipe(contextQuery, greatestNumberQuery), monitor);
assertEquals("1.0", 1, AbstractProvisioningTest.queryResultSize(queryResult));
AbstractProvisioningTest.assertContains("1.2", queryResult, 12);
assertTrue("1.0", monitor.isDone());
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java
index 4ae00813b..3c787c39e 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java
@@ -154,7 +154,7 @@ public class QueryTest extends TestCase {
List items = Arrays.asList("red", "green", "blue");
PerformHookQuery query1 = new PerformHookQuery();
PerformHookQuery query2 = new PerformHookQuery();
- PipedQuery cQuery = new PipedQuery(query1, query2);
+ IQuery cQuery = PipedQuery.createPipe(query1, query2);
assertFalse("1.0", query1.isComplete());
assertFalse("1.1", query1.isPrepared());
assertFalse("1.2", query2.isComplete());
@@ -195,7 +195,7 @@ public class QueryTest extends TestCase {
List items = Arrays.asList("red", new Object());
PerformHookQuery query1 = new PerformHookQuery();
PerformHookQuery query2 = new PerformHookQuery();
- PipedQuery cQuery = new PipedQuery(query1, query2);
+ IQuery cQuery = PipedQuery.createPipe(query1, query2);
assertFalse("1.0", query1.isComplete());
assertFalse("1.1", query1.isPrepared());
assertFalse("1.2", query2.isComplete());

Back to the top