diff options
author | Olivier Lamy <olamy@apache.org> | 2012-12-19 15:21:34 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-12-19 15:21:34 +0000 |
commit | 3c0ed32a13b73308247383ebb700bc9589b7571f (patch) | |
tree | 9a29440a142581fa491960adc42685b51cbab5bb /archiva-modules/archiva-scheduler | |
parent | e92fede1556b025a9db90d334d77481450e119bf (diff) | |
download | archiva-3c0ed32a13b73308247383ebb700bc9589b7571f.tar.gz archiva-3c0ed32a13b73308247383ebb700bc9589b7571f.zip |
fix mock RepositoryStatisticsManager compilation
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1423880 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-scheduler')
-rw-r--r-- | archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java index 950f47789..cf98060e7 100644 --- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java +++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestRepositoryStatisticsManager.java @@ -20,6 +20,7 @@ package org.apache.archiva.scheduler.repository; */ import org.apache.archiva.metadata.repository.MetadataRepository; +import org.apache.archiva.metadata.repository.MetadataRepositoryException; import org.apache.archiva.metadata.repository.stats.RepositoryStatistics; import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager; import org.springframework.stereotype.Service; @@ -30,12 +31,18 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -@Service("repositoryStatisticsManager#test") +@Service( "repositoryStatisticsManager#test" ) public class TestRepositoryStatisticsManager implements RepositoryStatisticsManager { private Map<String, List<RepositoryStatistics>> repoStats = new HashMap<String, List<RepositoryStatistics>>(); + public boolean hasStatistics( MetadataRepository metadataRepository, String repositoryId ) + throws MetadataRepositoryException + { + return !repoStats.isEmpty(); + } + public RepositoryStatistics getLastStatistics( MetadataRepository metadataRepository, String repositoryId ) { List<RepositoryStatistics> repositoryStatisticsList = getStatsList( repositoryId ); |