]> source.dussan.org Git - archiva.git/commitdiff
more usage of MockRepositorySessionFactory
authorOlivier Lamy <olamy@apache.org>
Thu, 1 Oct 2015 06:02:49 +0000 (16:02 +1000)
committerOlivier Lamy <olamy@apache.org>
Thu, 1 Oct 2015 06:02:49 +0000 (16:02 +1000)
archiva-modules/archiva-base/archiva-proxy/pom.xml
archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java [deleted file]

index 09ab294690ae509aa27d46264d34ace63609341f..83e0ce0686ed94e44e336bc215e68c98dc748ec8 100644 (file)
       <artifactId>archiva-repository-admin-default</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.archiva</groupId>
+      <artifactId>archiva-mock</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-rbac-cached</artifactId>
             <derby.system.home>${project.build.directory}/appserver-base</derby.system.home>
             <redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
-            <archiva.repositorySessionFactory.id>test</archiva.repositorySessionFactory.id>
+            <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
           </systemPropertyVariables>
         </configuration>
       </plugin>
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/metadata/repository/TestRepositorySessionFactory.java
deleted file mode 100644 (file)
index 5d2e820..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.apache.archiva.metadata.repository;
-
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Configurable;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable;
-import org.springframework.stereotype.Service;
-
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements.  See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership.  The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License.  You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied.  See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-@Service("repositorySessionFactory#test")
-public class TestRepositorySessionFactory
-    implements RepositorySessionFactory
-{
-    private MetadataResolver resolver;
-
-    @Override
-    public RepositorySession createSession()
-    {
-        return new RepositorySession( new AbstractMetadataRepository() {}, resolver );
-    }
-
-    public void setResolver( MetadataResolver resolver )
-    {
-        Configurable configurable;
-        Startable startable;
-        this.resolver = resolver;
-    }
-}