Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-01-13 17:29:41 +0000
committerPascal Rapicault2010-01-13 17:29:41 +0000
commit18189f0d42f7375660762dc6c885cf31683ae562 (patch)
tree17775d847bed9a33f3c68b74db2df75a2139c0bc /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation
parentc363f2984a09b73c422e38f4556fd3b23eafe958 (diff)
downloadrt.equinox.p2-18189f0d42f7375660762dc6c885cf31683ae562.tar.gz
rt.equinox.p2-18189f0d42f7375660762dc6c885cf31683ae562.tar.xz
rt.equinox.p2-18189f0d42f7375660762dc6c885cf31683ae562.zip
Merging api branch back to HEADv20100113
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java14
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationMetadataRepositoryFactoryTest.java17
2 files changed, 15 insertions, 16 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java
index b304bdca0..7df721d5c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/extensionlocation/ExtensionLocationArtifactRepositoryFactoryTest.java
@@ -16,9 +16,9 @@ import java.net.*;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.equinox.internal.p2.extensionlocation.Constants;
import org.eclipse.equinox.internal.p2.extensionlocation.ExtensionLocationArtifactRepositoryFactory;
-import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifactRepository;
-import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
-import org.eclipse.equinox.internal.provisional.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
import org.eclipse.equinox.p2.tests.AbstractProvisioningTest;
import org.eclipse.equinox.p2.tests.TestActivator;
@@ -172,7 +172,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
URI location = directory.toURI();
try {
IArtifactRepository repo = factory.load(location, 0, getMonitor());
- if (repo.getArtifactKeys().length != 2)
+ if (getArtifactKeyCount(repo) != 2)
fail("2.1");
} catch (ProvisionException ex) {
fail("2.0");
@@ -188,7 +188,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
URI location = directory.toURI();
try {
IArtifactRepository repo = factory.load(location, 0, getMonitor());
- if (repo.getArtifactKeys().length != 1)
+ if (getArtifactKeyCount(repo) != 1)
fail("2.1");
} catch (ProvisionException ex) {
fail("2.0");
@@ -204,7 +204,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
URI location = directory.toURI();
try {
IArtifactRepository repo = factory.load(location, 0, getMonitor());
- if (repo.getArtifactKeys().length != 1)
+ if (getArtifactKeyCount(repo) != 1)
fail("2.1");
} catch (ProvisionException ex) {
fail("2.0");
@@ -218,7 +218,7 @@ public class ExtensionLocationArtifactRepositoryFactoryTest extends AbstractProv
copy("1.1", getTestData("1.1", "/testData/extensionlocation"), eclipseDirectory);
try {
IArtifactRepository repo = factory.load(directory.toURI(), 0, getMonitor());
- if (repo.getArtifactKeys().length != 2)
+ if (getArtifactKeyCount(repo) != 2)
fail("1.0");
} catch (ProvisionException e) {
fail("0.5", e);
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");

Back to the top