|
Lines 18-23
Link Here
|
| 18 |
import org.eclipse.core.runtime.NullProgressMonitor; |
18 |
import org.eclipse.core.runtime.NullProgressMonitor; |
| 19 |
import org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction; |
19 |
import org.eclipse.equinox.internal.p2.updatesite.SiteXMLAction; |
| 20 |
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit; |
20 |
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit; |
|
|
21 |
import org.eclipse.equinox.internal.provisional.p2.metadata.query.IUPropertyQuery; |
| 21 |
import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery; |
22 |
import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery; |
| 22 |
import org.eclipse.equinox.internal.provisional.p2.query.Collector; |
23 |
import org.eclipse.equinox.internal.provisional.p2.query.Collector; |
| 23 |
import org.eclipse.equinox.p2.publisher.PublisherInfo; |
24 |
import org.eclipse.equinox.p2.publisher.PublisherInfo; |
|
Lines 187-192
Link Here
|
| 187 |
assertEquals("1.1", "Foo English Provider - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH)); |
188 |
assertEquals("1.1", "Foo English Provider - Translated in the Fragment", utils.getIUProperty(iu, IInstallableUnit.PROP_PROVIDER, Locale.ENGLISH)); |
| 188 |
} |
189 |
} |
| 189 |
|
190 |
|
|
|
191 |
public void testBundleLocalization_fragmentProperty() throws IOException { |
| 192 |
File bundle = TestData.getFile("localizationtests/foobundle2", ""); |
| 193 |
File fragment = TestData.getFile("localizationtests/foofragment2", ""); |
| 194 |
BundlesAction action = new BundlesAction(new File[] {bundle, fragment}); |
| 195 |
action.perform(info, results, monitor); |
| 196 |
|
| 197 |
Collector collector = results.query(new IUPropertyQuery(IInstallableUnit.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString()), new Collector(), new NullProgressMonitor()); |
| 198 |
assertEquals("1.0", 1, collector.size()); |
| 199 |
IInstallableUnit translationFragment = (IInstallableUnit) collector.iterator().next(); |
| 200 |
assertEquals("1.1", Boolean.TRUE.toString(), translationFragment.getProperty(IInstallableUnit.PROP_TYPE_FRAGMENT_TRANSLATION)); |
| 201 |
} |
| 202 |
|
| 190 |
public void testBundleLocalizationDE_fragment() throws IOException { |
203 |
public void testBundleLocalizationDE_fragment() throws IOException { |
| 191 |
File bundle = TestData.getFile("localizationtests/foobundle2", ""); |
204 |
File bundle = TestData.getFile("localizationtests/foobundle2", ""); |
| 192 |
File fragment = TestData.getFile("localizationtests/foofragment2", ""); |
205 |
File fragment = TestData.getFile("localizationtests/foofragment2", ""); |