From f1d408f40e38b1fdc88730cb3eb45e3bf6ac27fa Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 22 Oct 2012 14:50:49 +0000 Subject: [PATCH] fix mocks compilation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1400903 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/TestMetadataRepository.java | 7 +++++++ .../mock/MockRepositorySessionFactory.java | 7 +++++++ .../repository/TestMetadataRepository.java | 7 +++++++ .../mock/MockRepositorySessionFactory.java | 7 +++++++ .../mock/MockRepositorySessionFactory.java | 7 +++++++ .../NewArtifactsRssFeedProcessorTest.java | 20 ++++++++++++------- .../memory/TestMetadataRepository.java | 7 +++++++ .../repository/TestMetadataRepository.java | 7 +++++++ .../repository/TestMetadataRepository.java | 7 +++++++ 9 files changed, 69 insertions(+), 7 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java index 36ab43c3d..fbb0cbc44 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java @@ -207,4 +207,11 @@ public class TestMetadataRepository { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + } diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java index 2f1d8aa85..ca541c130 100644 --- a/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java +++ b/archiva-modules/archiva-base/archiva-indexer/src/test/java/org/apache/archiva/indexer/search/mock/MockRepositorySessionFactory.java @@ -267,6 +267,13 @@ public class MockRepositorySessionFactory { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + }; } }; diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java index 8e7013db3..75c94ee99 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java @@ -212,4 +212,11 @@ public class TestMetadataRepository { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + } diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java index ad8928c23..a3135e68b 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/java/org/apache/archiva/admin/mock/MockRepositorySessionFactory.java @@ -267,6 +267,13 @@ public class MockRepositorySessionFactory { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + }; } }; diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java index 09297f1ec..8d54b996f 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/mock/MockRepositorySessionFactory.java @@ -267,6 +267,13 @@ public class MockRepositorySessionFactory { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + }; } }; diff --git a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java index 5978c7c98..fb867010e 100644 --- a/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java +++ b/archiva-modules/archiva-web/archiva-rss/src/test/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessorTest.java @@ -31,6 +31,7 @@ import org.apache.archiva.metadata.repository.MetadataRepository; import org.apache.archiva.metadata.repository.MetadataRepositoryException; import org.apache.archiva.metadata.repository.MetadataResolutionException; import org.apache.archiva.rss.RssFeedGenerator; +import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -43,9 +44,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TimeZone; -import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner; -@RunWith( ArchivaBlockJUnit4ClassRunner.class ) +@RunWith (ArchivaBlockJUnit4ClassRunner.class) public class NewArtifactsRssFeedProcessorTest extends TestCase { @@ -67,7 +67,7 @@ public class NewArtifactsRssFeedProcessorTest metadataRepository = new MetadataRepositoryMock(); } - @SuppressWarnings( "unchecked" ) + @SuppressWarnings ("unchecked") @Test public void testProcess() throws Exception @@ -99,15 +99,15 @@ public class NewArtifactsRssFeedProcessorTest assertEquals( TEST_REPO, metadataRepository.getRepoId() ); assertTrue( feed.getTitle().equals( "New Artifacts in Repository 'test-repo'" ) ); - assertTrue( feed.getDescription().equals( - "New artifacts found in repository 'test-repo' during repository scan." ) ); + assertTrue( + feed.getDescription().equals( "New artifacts found in repository 'test-repo' during repository scan." ) ); assertTrue( feed.getLanguage().equals( "en-us" ) ); assertTrue( feed.getPublishedDate().equals( whenGathered ) ); List entries = feed.getEntries(); assertEquals( entries.size(), 1 ); - assertTrue( entries.get( 0 ).getTitle().equals( - "New Artifacts in Repository 'test-repo' as of " + whenGathered ) ); + assertTrue( + entries.get( 0 ).getTitle().equals( "New Artifacts in Repository 'test-repo' as of " + whenGathered ) ); assertTrue( entries.get( 0 ).getPublishedDate().equals( whenGathered ) ); } @@ -286,6 +286,12 @@ public class NewArtifactsRssFeedProcessorTest throw new UnsupportedOperationException(); } + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + public void setFrom( Date from ) { this.from = from; diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java index d5a4da2ed..5d71b853f 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java @@ -247,4 +247,11 @@ public class TestMetadataRepository { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + } \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java index 089bcc025..16a9795cb 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java @@ -208,4 +208,11 @@ public class TestMetadataRepository { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + } diff --git a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java index 214e6a81e..dc1e92bde 100644 --- a/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java +++ b/archiva-modules/plugins/maven2-repository/src/test/java/org/apache/archiva/metadata/repository/TestMetadataRepository.java @@ -223,4 +223,11 @@ public class TestMetadataRepository { } + + public void removeProject( String repositoryId, String namespace, String projectId ) + throws MetadataRepositoryException + { + throw new UnsupportedOperationException(); + } + } \ No newline at end of file