Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoribull2010-02-03 18:06:55 +0000
committeribull2010-02-03 18:06:55 +0000
commit0ba1beae8ae9c5ae3e8b25854f3378cf713bbf3c (patch)
tree9330ecf3ce8e0de43266b2ebdd93a1cf2f3f816a /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core
parentdcc11112ef2e6932b0d4093d7f2ea93a48202f48 (diff)
downloadrt.equinox.p2-0ba1beae8ae9c5ae3e8b25854f3378cf713bbf3c.tar.gz
rt.equinox.p2-0ba1beae8ae9c5ae3e8b25854f3378cf713bbf3c.tar.xz
rt.equinox.p2-0ba1beae8ae9c5ae3e8b25854f3378cf713bbf3c.zip
bug 301658: [query] IUQuery overrides getID and changes the semantics of the method. This patch removes getID and getProperty methods on IQuery and its subclasses.
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/PropertyLookupQuery1.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/PropertyLookupQuery2.java25
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/QueryTest.java31
3 files changed, 0 insertions, 83 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/PropertyLookupQuery1.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/PropertyLookupQuery1.java
deleted file mode 100644
index b212c8c28..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/PropertyLookupQuery1.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.tests.core;
-
-import org.eclipse.equinox.p2.query.MatchQuery;
-
-public class PropertyLookupQuery1 extends MatchQuery {
-
- public String getSomeProperty() {
- return "foo";
- }
-
- public String getThatProperty(Object param) {
- return "bar";
- }
-
- public boolean isMatch(Object candidate) {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/PropertyLookupQuery2.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/PropertyLookupQuery2.java
deleted file mode 100644
index e7e45457a..000000000
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/core/PropertyLookupQuery2.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2009 EclipseSource and others. All rights reserved. This
-* program and the accompanying materials are made available under the terms of
-* the Eclipse Public License v1.0 which accompanies this distribution, and is
-* available at http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* EclipseSource - initial API and implementation
-******************************************************************************/
-package org.eclipse.equinox.p2.tests.core;
-
-import java.util.Iterator;
-import org.eclipse.equinox.p2.query.Collector;
-import org.eclipse.equinox.p2.query.ContextQuery;
-
-public class PropertyLookupQuery2 extends ContextQuery {
-
- public String getSomeOtherProperty() {
- return "bar";
- }
-
- public Collector perform(Iterator iterator) {
- return null;
- }
-}
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 e05b16f25..4ae00813b 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
@@ -99,37 +99,6 @@ public class QueryTest extends TestCase {
assertTrue("1.4", query.areHooksExecutedProperly());
}
- public void testPropertyLookupMatchQuery() {
- IQuery query1 = new PropertyLookupQuery1();
- Object property = query1.getProperty("SomeProperty");
- assertEquals("1.0", "foo", property);
- }
-
- public void testPropertyLookupContextQuery() {
- IQuery query1 = new PropertyLookupQuery2();
- Object property = query1.getProperty("SomeOtherProperty");
- assertEquals("1.0", "bar", property);
- }
-
- public void testPropertyLookupInvalidProperty1() {
- IQuery query1 = new PropertyLookupQuery1();
- Object property = query1.getProperty("ThisProperty");
- assertEquals("1.0", null, property);
- }
-
- public void testPropertyLookupInvalidProperty2() {
- IQuery query1 = new PropertyLookupQuery1();
- Object property = query1.getProperty("SomeOtherProperty");
- assertEquals("1.0", null, property);
- }
-
- public void testIDLookup() {
- IQuery query1 = new PropertyLookupQuery1();
- IQuery query2 = new PropertyLookupQuery2();
- assertEquals("1.0", "org.eclipse.equinox.p2.tests.core.PropertyLookupQuery1", query1.getId());
- assertEquals("1.0", "org.eclipse.equinox.p2.tests.core.PropertyLookupQuery2", query2.getId());
- }
-
public void testPerformHooksOnQueryFail() {
List items = Arrays.asList("red", new Object());
PerformHookQuery query = new PerformHookQuery();

Back to the top