Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java74
1 files changed, 37 insertions, 37 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java
index 2def6875b..46a994748 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/LocalizationTests.java
@@ -17,9 +17,9 @@ import junit.framework.TestCase;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction;
-import org.eclipse.equinox.internal.provisional.p2.metadata.query.Collector;
import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.query.IQueryResult;
import org.eclipse.equinox.p2.publisher.PublisherInfo;
import org.eclipse.equinox.p2.publisher.PublisherResult;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
@@ -51,8 +51,8 @@ public class LocalizationTests extends TestCase {
FeaturesAction featuresAction = new FeaturesAction(new File[] {file});
featuresAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("fooFeature.feature.group"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("fooFeature.feature.group"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo English Feature", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME));
assertEquals("1.1", "Foo English Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER));
assertEquals("1.3", "Foo English Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION));
@@ -65,8 +65,8 @@ public class LocalizationTests extends TestCase {
FeaturesAction featuresAction = new FeaturesAction(new File[] {file});
featuresAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("fooFeature.feature.group"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("fooFeature.feature.group"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo English Feature", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "Foo English Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH));
assertEquals("1.3", "Foo English Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION, Locale.ENGLISH));
@@ -79,8 +79,8 @@ public class LocalizationTests extends TestCase {
FeaturesAction featuresAction = new FeaturesAction(new File[] {file});
featuresAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("fooFeature.feature.group"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("fooFeature.feature.group"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo German Feature", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "Foo German Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.GERMAN));
assertEquals("1.3", "Foo German Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION, Locale.GERMAN));
@@ -93,8 +93,8 @@ public class LocalizationTests extends TestCase {
FeaturesAction featuresAction = new FeaturesAction(new File[] {file});
featuresAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("fooFeature.feature.jar"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("fooFeature.feature.jar"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo English Feature", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME));
assertEquals("1.1", "Foo English Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER));
assertEquals("1.3", "Foo English Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION));
@@ -107,8 +107,8 @@ public class LocalizationTests extends TestCase {
FeaturesAction featuresAction = new FeaturesAction(new File[] {file});
featuresAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("fooFeature.feature.jar"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("fooFeature.feature.jar"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo English Feature", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "Foo English Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH));
assertEquals("1.3", "Foo English Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION, Locale.ENGLISH));
@@ -121,8 +121,8 @@ public class LocalizationTests extends TestCase {
FeaturesAction featuresAction = new FeaturesAction(new File[] {file});
featuresAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("fooFeature.feature.jar"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("fooFeature.feature.jar"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo German Feature", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "Foo German Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.GERMAN));
assertEquals("1.3", "Foo German Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION, Locale.GERMAN));
@@ -135,8 +135,8 @@ public class LocalizationTests extends TestCase {
BundlesAction action = new BundlesAction(new File[] {file});
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("foobundle"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("foobundle"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo English Bundle", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "Foo English Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH));
}
@@ -146,8 +146,8 @@ public class LocalizationTests extends TestCase {
BundlesAction action = new BundlesAction(new File[] {file});
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("foobundle"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("foobundle"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo German Bundle", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "Foo German Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.GERMAN));
}
@@ -157,8 +157,8 @@ public class LocalizationTests extends TestCase {
BundlesAction action = new BundlesAction(new File[] {file});
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("barbundle"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("barbundle"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Bar English Bundle", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "Bar English Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH));
}
@@ -168,8 +168,8 @@ public class LocalizationTests extends TestCase {
BundlesAction action = new BundlesAction(new File[] {file});
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("barbundle"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("barbundle"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Bar German Bundle", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "Bar German Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.GERMAN));
}
@@ -181,8 +181,8 @@ public class LocalizationTests extends TestCase {
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("foobundle2"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("foobundle2"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo English Bundle - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "Foo English Provider - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH));
}
@@ -194,8 +194,8 @@ public class LocalizationTests extends TestCase {
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("foobundle2"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("foobundle2"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Foo German Bundle - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "Foo German Provider - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.GERMAN));
}
@@ -207,8 +207,8 @@ public class LocalizationTests extends TestCase {
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("barbundle2"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("barbundle2"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Bar English Bundle - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "Bar English Provider - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH));
}
@@ -220,8 +220,8 @@ public class LocalizationTests extends TestCase {
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("barbundle2"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("barbundle2"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "Bar German Bundle - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "Bar German Provider - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.GERMAN));
}
@@ -233,8 +233,8 @@ public class LocalizationTests extends TestCase {
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("barfragment2"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("barfragment2"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "English Fragment Name", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "English Fragment Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH));
}
@@ -246,8 +246,8 @@ public class LocalizationTests extends TestCase {
action.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("barfragment2"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("barfragment2"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "German Fragment Name", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "German Fragment Provider", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.GERMAN));
}
@@ -262,8 +262,8 @@ public class LocalizationTests extends TestCase {
siteAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("foo.new_category_1"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("foo.new_category_1"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "English Category Name", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.ENGLISH));
assertEquals("1.1", "English Category Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION, Locale.ENGLISH));
@@ -279,8 +279,8 @@ public class LocalizationTests extends TestCase {
siteAction.perform(info, results, monitor);
IUPropertyUtils utils = new IUPropertyUtils(results.query(new InstallableUnitQuery((String) null), monitor));
- Collector collector = results.query(new InstallableUnitQuery("foo.new_category_1"), monitor);
- IInstallableUnit iu = (IInstallableUnit) collector.iterator().next();
+ IQueryResult queryResult = results.query(new InstallableUnitQuery("foo.new_category_1"), monitor);
+ IInstallableUnit iu = (IInstallableUnit) queryResult.iterator().next();
assertEquals("1.0", "German Category Name", utils.getIUProperty(iu, IInstallableUnit.PROP_NAME, Locale.GERMAN));
assertEquals("1.1", "German Category Description", utils.getIUProperty(iu, IInstallableUnit.PROP_DESCRIPTION, Locale.GERMAN));

Back to the top