aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2015-10-01 16:21:14 +1000
committerOlivier Lamy <olamy@apache.org>2015-10-01 16:21:14 +1000
commit4ad5e63c6410661733068fd23472e76cd4bc929d (patch)
tree4bcb5aa4b3658c6dad78d9851c61acf307d11d5a /archiva-modules/archiva-base
parent4ce3140da9230710007669765f9579f0bd76cd82 (diff)
downloadarchiva-4ad5e63c6410661733068fd23472e76cd4bc929d.tar.gz
archiva-4ad5e63c6410661733068fd23472e76cd4bc929d.zip
more usage of MockRepositorySessionFactory
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java
index 319942ba4..a1a27dcb9 100644
--- a/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java
+++ b/archiva-modules/archiva-base/archiva-mock/src/main/java/org/apache/archiva/mock/MockRepositorySessionFactory.java
@@ -21,6 +21,7 @@ package org.apache.archiva.mock;
import org.apache.archiva.metadata.repository.AbstractMetadataRepository;
import org.apache.archiva.metadata.repository.MetadataRepository;
+import org.apache.archiva.metadata.repository.MetadataResolver;
import org.apache.archiva.metadata.repository.RepositorySession;
import org.apache.archiva.metadata.repository.RepositorySessionFactory;
import org.springframework.stereotype.Service;
@@ -36,15 +37,22 @@ public class MockRepositorySessionFactory
{
};
+ private MetadataResolver resolver;
+
public void setRepository( MetadataRepository repository )
{
this.repository = repository;
}
+ public void setResolver( MetadataResolver resolver )
+ {
+ this.resolver = resolver;
+ }
+
@Override
public RepositorySession createSession()
{
- return new RepositorySession( repository, null )
+ return new RepositorySession( repository, resolver )
{
@Override
public void close()