Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Oberlies2012-09-28 15:19:13 +0000
committerTobias Oberlies2012-09-28 16:36:55 +0000
commitf72633ae25b4e1d13c360084c507a3df664af2e2 (patch)
tree15b494732b9be355ca3c422274cc56052a04076e /bundles/org.eclipse.equinox.p2.tests
parentdb33b44e26737be1f0b823656600ce8c2a181e3b (diff)
downloadrt.equinox.p2-f72633ae25b4e1d13c360084c507a3df664af2e2.tar.gz
rt.equinox.p2-f72633ae25b4e1d13c360084c507a3df664af2e2.tar.xz
rt.equinox.p2-f72633ae25b4e1d13c360084c507a3df664af2e2.zip
390361 Add JavaDoc to addContextIU
- Also: Use more common term "IU" instead of "unit"
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java22
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java2
4 files changed, 27 insertions, 16 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java
index 716a4290f..00c2016fc 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ActionTest.java
@@ -195,11 +195,22 @@ public abstract class ActionTest extends AbstractProvisioningTest {
debug(message);
}
- protected final void addContextUnit(String unitId, String unitVersion) {
+ /**
+ * Adds an installable unit in the context visible to actions.
+ *
+ * @see AbstractPublisherAction#queryForIU
+ */
+ protected final void addContextIU(String unitId, String unitVersion) {
+ // could also be added to a context metadata repository in the publisher info, but this is easier
publisherResult.addIU(createIU(unitId, Version.create(unitVersion)), IPublisherResult.NON_ROOT);
}
- protected final void addContextUnit(String unitId, String unitVersion, String filter) {
+ /**
+ * Adds an installable unit in the context visible to actions.
+ *
+ * @see AbstractPublisherAction#queryForIU
+ */
+ protected final void addContextIU(String unitId, String unitVersion, String filter) {
publisherResult.addIU(createIU(unitId, Version.create(unitVersion), filter, NO_PROVIDES), IPublisherResult.NON_ROOT);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java
index af1fdb8dd..4da44836a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionCapturingTest.java
@@ -70,7 +70,7 @@ public class ProductActionCapturingTest extends ActionTest {
* IConfigAdvice (start levels, auto-start).
*/
public void testSetBundleConfigData() throws Exception {
- addContextUnit("org.eclipse.rcp.feature.group", "3.5.0.v20081110-9C9tEvNEla71LZ2jFz-RFB-t");
+ addContextIU("org.eclipse.rcp.feature.group", "3.5.0.v20081110-9C9tEvNEla71LZ2jFz-RFB-t");
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "startLevel.product").toString());
testAction = new ProductAction(source, productFile, flavorArg, executablesFeatureLocation);
@@ -97,7 +97,7 @@ public class ProductActionCapturingTest extends ActionTest {
*/
public void testPlatformProduct() throws Exception {
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "platform.product").toString());
- addContextUnit("org.eclipse.platform.feature.group", "1.2.3");
+ addContextIU("org.eclipse.platform.feature.group", "1.2.3");
testAction = new ProductAction(source, productFile, flavorArg, executablesFeatureLocation);
IStatus status = testAction.perform(publisherInfo, publisherResult, null);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java
index 7bc3ecd7c..17728c095 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTest.java
@@ -79,7 +79,7 @@ public class ProductActionTest extends ActionTest {
*/
public void testBrandedApplication() throws Exception {
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "brandedProduct/branded.product").toString());
- addContextUnit("org.eclipse.platform.feature.group", "1.2.3");
+ addContextIU("org.eclipse.platform.feature.group", "1.2.3");
performProductAction(productFile);
Collection ius = publisherResult.getIUs("branded.product", IPublisherResult.NON_ROOT);
@@ -131,11 +131,11 @@ public class ProductActionTest extends ActionTest {
ProductFile productFile1 = new ProductFile(TestData.getFile("ProductActionTest", "boundedVersionConfigurations.product").toString());
ProductFile productFile2 = new ProductFile(TestData.getFile("ProductActionTest", "unboundedVersionConfigurations.product").toString());
- addContextUnit("org.eclipse.core.runtime", "4.0.0");
+ addContextIU("org.eclipse.core.runtime", "4.0.0");
performProductAction(productFile1);
publisherResult = new PublisherResult();
- addContextUnit("org.eclipse.core.runtime", "4.0.0");
+ addContextIU("org.eclipse.core.runtime", "4.0.0");
performProductAction(productFile2);
IQueryResult queryResult = publisherResult.query(QueryUtil.createIUQuery(flavorArg + configSpec + "org.eclipse.core.runtime"), new NullProgressMonitor());
assertEquals("1.0", 1, queryResultSize(queryResult));
@@ -145,7 +145,7 @@ public class ProductActionTest extends ActionTest {
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "unboundedVersionConfigurations.product").toString());
setConfiguration(LINUX_CONFIG_SPEC);
- addContextUnit("org.eclipse.core.runtime", "0.0.0", WIN_FILTER);
+ addContextIU("org.eclipse.core.runtime", "0.0.0", WIN_FILTER);
performProductAction(productFile);
@@ -160,7 +160,7 @@ public class ProductActionTest extends ActionTest {
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "unboundedVersionConfigurations.product").toString());
setConfiguration(LINUX_CONFIG_SPEC);
- addContextUnit("org.eclipse.core.runtime", "0.0.0", LINUX_FILTER);
+ addContextIU("org.eclipse.core.runtime", "0.0.0", LINUX_FILTER);
performProductAction(productFile);
@@ -175,7 +175,7 @@ public class ProductActionTest extends ActionTest {
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "unboundedVersionConfigurations.product").toString());
setConfiguration(LINUX_CONFIG_SPEC);
- addContextUnit("org.eclipse.core.runtime", null, LINUX_FILTER);
+ addContextIU("org.eclipse.core.runtime", null, LINUX_FILTER);
performProductAction(productFile);
@@ -192,7 +192,7 @@ public class ProductActionTest extends ActionTest {
// Set a specific version number, the one in the .product file uses 0.0.0. Let's see if it binds properly
//filter is different from linuxConfigSpec, but will still match
- addContextUnit("org.eclipse.core.runtime", "4.0.0", "(osgi.os=linux)");
+ addContextIU("org.eclipse.core.runtime", "4.0.0", "(osgi.os=linux)");
performProductAction(productFile);
@@ -209,7 +209,7 @@ public class ProductActionTest extends ActionTest {
// Set a specific version number, the one in the .product file uses 0.0.0. Let's see if it binds properly
//filter is different from linuxConfigSpec, but will still match
- addContextUnit("org.eclipse.core.runtime", "4.0.0", "(osgi.os=linux)");
+ addContextIU("org.eclipse.core.runtime", "4.0.0", "(osgi.os=linux)");
performProductAction(productFile);
@@ -225,7 +225,7 @@ public class ProductActionTest extends ActionTest {
public void testMultiConfigspecProductPublishing() throws IOException, Exception {
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "platform.product").toString());
((PublisherInfo) publisherInfo).setConfigurations(new String[] {"carbon.macos.x86", "cocoa.macos.x86"});
- addContextUnit("org.eclipse.platform.feature.group", "1.2.3");
+ addContextIU("org.eclipse.platform.feature.group", "1.2.3");
performProductAction(productFile);
@@ -238,7 +238,7 @@ public class ProductActionTest extends ActionTest {
String configSpecANY = AbstractPublisherAction.createConfigSpec("ANY", "ANY", "ANY"); // configuration spec to create CUs without filters
setConfiguration(configSpecANY);
- addContextUnit("org.eclipse.core.runtime", "4.0.0");
+ addContextIU("org.eclipse.core.runtime", "4.0.0");
performProductAction(productFile);
@@ -257,7 +257,7 @@ public class ProductActionTest extends ActionTest {
String configSpecANY = AbstractPublisherAction.createConfigSpec("ANY", "ANY", "ANY"); // configuration spec to create CUs without filters
setConfiguration(configSpecANY);
- addContextUnit("org.eclipse.core.runtime", "4.0.0", WIN_FILTER); // any valid filter can be set here
+ addContextIU("org.eclipse.core.runtime", "4.0.0", WIN_FILTER); // any valid filter can be set here
performProductAction(productFile);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java
index 1f5442ae2..410d71a6c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/ProductActionTestMac.java
@@ -66,7 +66,7 @@ public class ProductActionTestMac extends ActionTest {
*/
public void testPlatformProduct() throws Exception {
ProductFile productFile = new ProductFile(TestData.getFile("ProductActionTest", "platform.product").toString());
- addContextUnit("org.eclipse.platform.feature.group", "3.8.3");
+ addContextIU("org.eclipse.platform.feature.group", "3.8.3");
testAction = new ProductAction(source, productFile, flavorArg, executablesFeatureLocation);
IStatus status = testAction.perform(publisherInfo, publisherResult, null);
assertThat(status, is(okStatus()));

Back to the top