diff options
author | Olivier Lamy <olamy@apache.org> | 2012-10-22 14:51:12 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-10-22 14:51:12 +0000 |
commit | ede04803337d62e38cafe63e98816540fa989385 (patch) | |
tree | 38b88d574b5ac57805cd15fc66663ee9cc087d27 /archiva-modules/metadata | |
parent | f1d408f40e38b1fdc88730cb3eb45e3bf6ac27fa (diff) | |
download | archiva-ede04803337d62e38cafe63e98816540fa989385.tar.gz archiva-ede04803337d62e38cafe63e98816540fa989385.zip |
[MRM-1703] Cannot delete project add unit test for metadata repository.
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1400904 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata')
-rw-r--r-- | archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java index 55aed9ce7..d7152b864 100644 --- a/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java +++ b/archiva-modules/metadata/metadata-repository-api/src/test/java/org/apache/archiva/metadata/repository/AbstractMetadataRepositoryTest.java @@ -1170,6 +1170,25 @@ public abstract class AbstractMetadataRepositoryTest } @Test + public void deleteProject() + throws Exception + { + ArtifactMetadata artifact = createArtifact(); + artifact.addFacet( new TestMetadataFacet( "value" ) ); + + repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact ); + + repository.updateArtifact( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT, TEST_PROJECT_VERSION, artifact ); + + assertEquals( 1, repository.getProjectVersions( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT ).size() ); + + repository.removeProject( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT ); + + assertEquals( 0, repository.getProjectVersions( TEST_REPO_ID, TEST_NAMESPACE, TEST_PROJECT ).size() ); + } + + + @Test public void deleteSnapshotVersion() throws Exception { |