From 3c0ed32a13b73308247383ebb700bc9589b7571f Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 19 Dec 2012 15:21:34 +0000 Subject: [PATCH] fix mock RepositoryStatisticsManager compilation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1423880 13f79535-47bb-0310-9956-ffa450edef68 --- .../repository/TestRepositoryStatisticsManager.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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> repoStats = new HashMap>(); + public boolean hasStatistics( MetadataRepository metadataRepository, String repositoryId ) + throws MetadataRepositoryException + { + return !repoStats.isEmpty(); + } + public RepositoryStatistics getLastStatistics( MetadataRepository metadataRepository, String repositoryId ) { List repositoryStatisticsList = getStatsList( repositoryId );