diff options
author | John Arthorne | 2008-04-24 15:33:54 +0000 |
---|---|---|
committer | John Arthorne | 2008-04-24 15:33:54 +0000 |
commit | ed22db490611eb12ceb1dd8fb4859120b3410e33 (patch) | |
tree | 6a4c33d5b7148fc5330158a5912aba54d13dae68 /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java | |
parent | ad6362b8a10f09b89a31974afd87a99350c728e5 (diff) | |
download | rt.equinox.p2-ed22db490611eb12ceb1dd8fb4859120b3410e33.tar.gz rt.equinox.p2-ed22db490611eb12ceb1dd8fb4859120b3410e33.tar.xz rt.equinox.p2-ed22db490611eb12ceb1dd8fb4859120b3410e33.zip |
Added tests for repo enablementv20080424-1143
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java | 11 |
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); } /** |