diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java index 82af17cd1..0049f8def 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java @@ -15,11 +15,10 @@ import java.io.IOException; import java.net.*; import org.eclipse.equinox.internal.p2.extensionlocation.Constants; import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationMetadataRepositoryFactory; -import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException; -import org.eclipse.equinox.internal.provisional.p2.metadata.query.Collector; -import org.eclipse.equinox.internal.provisional.p2.metadata.query.InstallableUnitQuery; -import org.eclipse.equinox.internal.provisional.p2.metadata.repository.IMetadataRepository; -import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager; +import org.eclipse.equinox.p2.core.ProvisionException; +import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery; +import org.eclipse.equinox.p2.repository.IRepositoryManager; +import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository; import org.eclipse.equinox.p2.tests.AbstractProvisioningTest; public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProvisioningTest { @@ -164,7 +163,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv URI location = directory.toURI(); try { IMetadataRepository repo = factory.load(location, 0, getMonitor()); - if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 3) + if (queryResultSize(repo.query(InstallableUnitQuery.ANY, null)) != 3) fail("2.99"); } catch (ProvisionException ex) { fail("2.0"); @@ -180,7 +179,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv URI location = directory.toURI(); try { IMetadataRepository repo = factory.load(location, 0, getMonitor()); - if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 2) + if (queryResultSize(repo.query(InstallableUnitQuery.ANY, null)) != 2) fail("3.0"); } catch (ProvisionException ex) { fail("2.0"); @@ -196,7 +195,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv URI location = directory.toURI(); try { IMetadataRepository repo = factory.load(location, 0, getMonitor()); - if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 1) + if (queryResultSize(repo.query(InstallableUnitQuery.ANY, null)) != 1) fail("3.0"); } catch (ProvisionException ex) { fail("2.0"); @@ -210,7 +209,7 @@ public class ExtensionLocationMetadataRepositoryFactoryTest extends AbstractProv copy("1.0", getTestData("1.1", "/testData/extensionlocation"), eclipseDirectory); try { IMetadataRepository repo = factory.load(directory.toURI(), 0, getMonitor()); - if (repo.query(InstallableUnitQuery.ANY, new Collector(), null).toCollection().size() != 3) + if (queryResultSize(repo.query(InstallableUnitQuery.ANY, null)) != 3) fail("3.0"); } catch (ProvisionException e) { fail("2.0"); |