Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2008-04-24 15:33:54 +0000
committerJohn Arthorne2008-04-24 15:33:54 +0000
commited22db490611eb12ceb1dd8fb4859120b3410e33 (patch)
tree6a4c33d5b7148fc5330158a5912aba54d13dae68
parentad6362b8a10f09b89a31974afd87a99350c728e5 (diff)
downloadrt.equinox.p2-20080424-1143.tar.gz
rt.equinox.p2-20080424-1143.tar.xz
rt.equinox.p2-20080424-1143.zip
Added tests for repo enablementv20080424-1143
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
index f8cfb4b48..801fd40d9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
@@ -104,14 +104,21 @@ public class MetadataRepositoryManagerTest extends AbstractProvisioningTest {
assertEquals("4.0", disabledCount + 1, newDisabledCount);
assertEquals("4.1", allCount - 1, newAllCount);
+ //re-loading the repository should not change anything
+ manager.loadRepository(testRepo.getLocation(), null);
+ newDisabledCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_DISABLED).length;
+ newAllCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_ALL).length;
+ assertEquals("5.0", disabledCount + 1, newDisabledCount);
+ assertEquals("5.1", allCount - 1, newAllCount);
+
//re-enable the repository
manager.setEnabled(testRepo.getLocation(), true);
//should be back to the original counts
newDisabledCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_DISABLED).length;
newAllCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_ALL).length;
- assertEquals("4.0", disabledCount, newDisabledCount);
- assertEquals("4.1", allCount, newAllCount);
+ assertEquals("6.0", disabledCount, newDisabledCount);
+ assertEquals("6.1", allCount, newAllCount);
}
/**

Back to the top