Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-02-26 18:26:57 +0000
committerPascal Rapicault2010-02-26 18:26:57 +0000
commit18cae7ef48efa5617bbae7d46166b59391eb0648 (patch)
tree6e3a762ec830a0b960a40567d07bf48dd8c1ef83 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher
parentcf6db3cd275c261eb0f08858c3fb06ab3099a6a9 (diff)
downloadrt.equinox.p2-18cae7ef48efa5617bbae7d46166b59391eb0648.tar.gz
rt.equinox.p2-18cae7ef48efa5617bbae7d46166b59391eb0648.tar.xz
rt.equinox.p2-18cae7ef48efa5617bbae7d46166b59391eb0648.zip
Rename getRequiredCapabilities to getRequirements
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootIUActionTest.java2
9 files changed, 19 insertions, 19 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
index 37477519b..1f5b9597a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/AdviceFileParserTest.java
@@ -275,7 +275,7 @@ public class AdviceFileParserTest extends TestCase {
assertEquals(null, iu0.getFilter());
assertEquals(0, iu0.getLicenses().size());
assertEquals(0, iu0.getProperties().size());
- assertEquals(0, iu0.getRequiredCapabilities().size());
+ assertEquals(0, iu0.getRequirements().size());
assertEquals(0, iu0.getProvidedCapabilities().size());
assertEquals(0, iu0.getMetaRequirements().size());
assertEquals(0, iu0.getTouchpointData().size());
@@ -304,7 +304,7 @@ public class AdviceFileParserTest extends TestCase {
assertEquals("testValue1", iu1.getProperty("testName1"));
assertEquals("testValue2", iu1.getProperty("testName2"));
- Collection<IRequirement> reqs = iu1.getRequiredCapabilities();
+ Collection<IRequirement> reqs = iu1.getRequirements();
Iterator it2 = reqs.iterator();
IRequirement req0 = (IRequirement) it2.next();
IRequirement req1 = (IRequirement) it2.next();
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java
index c5eb6e00a..749c55bb7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/BundlesActionTest.java
@@ -189,7 +189,7 @@ public class BundlesActionTest extends ActionTest {
assertEquals("1.1", bundle1IU.getVersion(), BUNDLE1_VERSION);
// check required capabilities
- Collection<IRequirement> requiredCapability = bundle1IU.getRequiredCapabilities();
+ Collection<IRequirement> requiredCapability = bundle1IU.getRequirements();
verifyRequiredCapability(requiredCapability, TEST1_IUD_NAMESPACE, TEST1_IUD_NAME, TEST1_IUD_VERSION_RANGE);
assertEquals("2.0", 1, requiredCapability.size());
@@ -224,7 +224,7 @@ public class BundlesActionTest extends ActionTest {
assertEquals(bundle2IU.getVersion(), BUNDLE2_VERSION);
// check required capabilities
- Collection<IRequirement> requiredCapabilities = bundle2IU.getRequiredCapabilities();
+ Collection<IRequirement> requiredCapabilities = bundle2IU.getRequirements();
verifyRequiredCapability(requiredCapabilities, TEST2_IUA_NAMESPACE, TEST2_REQA_NAME, TEST2_IUA_VERSION_RANGE);
verifyRequiredCapability(requiredCapabilities, TEST2_IUB_NAMESPACE, TEST2_REQB_NAME, TEST2_IUB_VERSION_RANGE);
verifyRequiredCapability(requiredCapabilities, TEST2_IUC_NAMESPACE, TEST2_REQC_NAME, TEST2_IUC_VERSION_RANGE);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java
index 319786f0b..a473cd480 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ConfigCUsActionTest.java
@@ -63,7 +63,7 @@ public class ConfigCUsActionTest extends ActionTest {
assertTrue(providedCapabilities.size() == 1);
//verify RequiredCapabilities
- List<IRequirement> requiredCapability = iu.getRequiredCapabilities();
+ List<IRequirement> requiredCapability = iu.getRequirements();
verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, flavor + id + ".config." + configSpec, new VersionRange(version, true, version, true)); //$NON-NLS-1$
verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, flavor + id + ".ini." + configSpec, new VersionRange(version, true, version, true)); //$NON-NLS-1$
assertTrue(requiredCapability.size() == 2);
@@ -86,7 +86,7 @@ public class ConfigCUsActionTest extends ActionTest {
verifyProvidedCapability(providedCapabilities, IInstallableUnit.NAMESPACE_IU_ID, flavor + id + "." + cuType + "." + configSpec, version); //$NON-NLS-1$//$NON-NLS-2$
verifyProvidedCapability(providedCapabilities, flavor + id, id + "." + cuType, version); //$NON-NLS-1$
assertTrue(providedCapabilities.size() == 2);
- assertTrue(iu.getRequiredCapabilities().size() == 0);
+ assertTrue(iu.getRequirements().size() == 0);
return; //pass
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
index f63b64cad..93664f6d2 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
@@ -94,7 +94,7 @@ public class EquinoxExecutableActionTest extends ActionTest {
Collection<IProvidedCapability> providedCapability = fragment.getProvidedCapabilities();
verifyProvidedCapability(providedCapability, IInstallableUnit.NAMESPACE_IU_ID, flavorArg + idBase + ".executable." + configSpec, version); //$NON-NLS-1$
assertTrue(providedCapability.size() == 1);
- Collection<IRequirement> requiredCapability = fragment.getRequiredCapabilities();
+ Collection<IRequirement> requiredCapability = fragment.getRequirements();
verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + configSpec, new VersionRange(version, true, version, true)); //$NON-NLS-1$
assertTrue(requiredCapability.size() == 1);
assertTrue(fragment.getFilter().equals(ExpressionUtil.parseLDAP("(& (osgi.ws=" + ws + ")(osgi.os=" + os + ")(osgi.arch=" + arch + "))"))); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
@@ -114,7 +114,7 @@ public class EquinoxExecutableActionTest extends ActionTest {
Collection<IProvidedCapability> providedCapability = possibleEclipse.getProvidedCapabilities();
verifyProvidedCapability(providedCapability, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + configSpec + ".eclipse", version); //$NON-NLS-1$ //$NON-NLS-2$
assertTrue(providedCapability.size() == 1);
- Collection<IRequirement> req = possibleEclipse.getRequiredCapabilities();
+ Collection<IRequirement> req = possibleEclipse.getRequirements();
assertTrue(req.size() == 0);
return;//pass
}
@@ -142,7 +142,7 @@ public class EquinoxExecutableActionTest extends ActionTest {
verifyProvidedCapability(providedCapabilities, flavorArg + idBase, idBase + ".executable", version); //$NON-NLS-1$
assertTrue(providedCapabilities.size() == 2);
- Collection<IRequirement> requiredCapability = possibleExec.getRequiredCapabilities();
+ Collection<IRequirement> requiredCapability = possibleExec.getRequirements();
verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.equinox.launcher." + (idBase.equals("mac") || idBase.equals("macCocoa") ? configSpec.substring(0, configSpec.lastIndexOf(".")) : configSpec), VersionRange.emptyRange); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
assertTrue(requiredCapability.size() == 1);
return;//pass
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
index c237e2fc4..0cb6f7f73 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxLauncherCUActionTest.java
@@ -62,9 +62,9 @@ public class EquinoxLauncherCUActionTest extends ActionTest {
if (iu.getId().equals(flavorArg + EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER)) {
assertTrue(iu instanceof InstallableUnitFragment);
//verify required capability
- verifyRequiredCapability(iu.getRequiredCapabilities(), PublisherHelper.OSGI_BUNDLE_CLASSIFIER, EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER, VersionRange.emptyRange);
- verifyRequiredCapability(iu.getRequiredCapabilities(), PublisherHelper.NAMESPACE_ECLIPSE_TYPE, "bundle", new VersionRange(Version.create("1.0.0"), true, Version.create("2.0.0"), false)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertTrue(iu.getRequiredCapabilities().size() == 2);
+ verifyRequiredCapability(iu.getRequirements(), PublisherHelper.OSGI_BUNDLE_CLASSIFIER, EquinoxLauncherCUAction.ORG_ECLIPSE_EQUINOX_LAUNCHER, VersionRange.emptyRange);
+ verifyRequiredCapability(iu.getRequirements(), PublisherHelper.NAMESPACE_ECLIPSE_TYPE, "bundle", new VersionRange(Version.create("1.0.0"), true, Version.create("2.0.0"), false)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ assertTrue(iu.getRequirements().size() == 2);
Collection<IProvidedCapability> cap = iu.getProvidedCapabilities();
verifyProvidedCapability(cap, IInstallableUnit.NAMESPACE_IU_ID, flavorArg + "org.eclipse.equinox.launcher", Version.emptyVersion); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java
index 3338cd685..ce9c43377 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/FeaturesActionTest.java
@@ -87,7 +87,7 @@ public class FeaturesActionTest extends ActionTest {
action.perform(publisherInfo, publisherResult, new NullProgressMonitor());
IInstallableUnit iu = publisherResult.getIU("test.feature.feature.group", Version.parseVersion("1.0.0"), null);
- Collection<IRequirement> requires = iu.getRequiredCapabilities();
+ Collection<IRequirement> requires = iu.getRequirements();
assertEquals(5, requires.size());
for (IRequirement require : requires) {
if (((IRequiredCapability) require).getName().equals("org.foo.feature.group")) {
@@ -132,7 +132,7 @@ public class FeaturesActionTest extends ActionTest {
String fooValue = tpData.iterator().next().getInstructions().get("zipped").getBody(); //$NON-NLS-1$
assertTrue(fooValue.equalsIgnoreCase("true")); //$NON-NLS-1$
- Collection<IRequirement> fooRequiredCapabilities = foo.getRequiredCapabilities();
+ Collection<IRequirement> fooRequiredCapabilities = foo.getRequirements();
assertTrue(fooRequiredCapabilities.size() == 0);
Collection<IProvidedCapability> fooProvidedCapabilities = foo.getProvidedCapabilities();
@@ -170,7 +170,7 @@ public class FeaturesActionTest extends ActionTest {
barIUs = new ArrayList(publisherResult.getIUs("bar.feature.group", IPublisherResult.ROOT)); //$NON-NLS-1$
assertTrue(fooIUs.size() == 1);
IInstallableUnit barGroup = (IInstallableUnit) barIUs.get(0);
- Collection<IRequirement> barRequiredCapabilities = barGroup.getRequiredCapabilities();
+ Collection<IRequirement> barRequiredCapabilities = barGroup.getRequirements();
//contains(barRequiredCapabilities, IInstallableUnit.NAMESPACE_IU_ID, "bar_root", new VersionRange(barVersion, true, barVersion, true), null, false /*multiple*/, false /*optional*/); //$NON-NLS-1$//$NON-NLS-2$
contains(barRequiredCapabilities, IInstallableUnit.NAMESPACE_IU_ID, "bar.feature.jar", new VersionRange(barVersion, true, barVersion, true), "(org.eclipse.update.install.features=true)", false /*multiple*/, false /*optional*/); //$NON-NLS-1$//$NON-NLS-2$
contains(barRequiredCapabilities, IInstallableUnit.NAMESPACE_IU_ID, "org.bar.feature.feature.group", VersionRange.emptyRange, "(&(|(osgi.nl=de)(osgi.nl=en)(osgi.nl=fr)))", false /*multiple*/, false /*optional*/); //$NON-NLS-1$//$NON-NLS-2$
@@ -184,7 +184,7 @@ public class FeaturesActionTest extends ActionTest {
assertTrue(bar.getTouchpointType().getId().equalsIgnoreCase("org.eclipse.equinox.p2.osgi")); //$NON-NLS-1$
assertTrue(bar.getTouchpointType().getVersion().equals(fooVersion));
//String namespace, String name, VersionRange range, String filter, boolean optional, boolean multiple, boolean greedy)
- barRequiredCapabilities = bar.getRequiredCapabilities();
+ barRequiredCapabilities = bar.getRequirements();
assertTrue(barRequiredCapabilities.size() == 0);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java
index 94a0eac75..942614885 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/JREActionTest.java
@@ -92,7 +92,7 @@ public class JREActionTest extends ActionTest {
assertTrue(((ITouchpointInstruction) instructions.get("install")).getBody().equals("unzip(source:@artifact, target:${installFolder});")); //$NON-NLS-1$//$NON-NLS-2$
assertTrue(((ITouchpointInstruction) instructions.get("uninstall")).getBody().equals("cleanupzip(source:@artifact, target:${installFolder});")); //$NON-NLS-1$ //$NON-NLS-2$
}
- Collection<IRequirement> requiredCapability = bar.getRequiredCapabilities();
+ Collection<IRequirement> requiredCapability = bar.getRequirements();
verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, id, new VersionRange(JREVersion, true, Version.MAX_VERSION, true)); //$NON-NLS-1$
assertTrue(requiredCapability.size() == 1);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java
index 9c51eb546..1c2a68f29 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionWithAdviceFileTest.java
@@ -82,7 +82,7 @@ public class ProductActionWithAdviceFileTest extends ActionTest {
IQueryResult results = publisherResult.query(new IUQuery("org.eclipse.platform.ide", Version.create("3.5.0.I20081118")), null);
assertEquals("1.0", 1, queryResultSize(results));
IInstallableUnit unit = (IInstallableUnit) results.iterator().next();
- Collection<IRequirement> requiredCapabilities = unit.getRequiredCapabilities();
+ Collection<IRequirement> requiredCapabilities = unit.getRequirements();
IRequiredCapability capability = null;
for (Iterator iterator = requiredCapabilities.iterator(); iterator.hasNext();) {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootIUActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootIUActionTest.java
index d724773fc..ebee6443b 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootIUActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/RootIUActionTest.java
@@ -268,7 +268,7 @@ public class RootIUActionTest extends ActionTest {
IInstallableUnit iu = (IInstallableUnit) ius.get(0);
assertTrue(iu != null);
assertTrue(iu.getVersion().equals(versionArg));
- Collection<IRequirement> required = iu.getRequiredCapabilities();
+ Collection<IRequirement> required = iu.getRequirements();
if ((testSpec & EMPTY) > 0)
assertEquals(required.size(), 0);
String confirmedIUs = ""; //$NON-NLS-1$

Back to the top