more unit tests fixes

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1403514 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-10-29 21:03:40 +00:00
parent c64ec5513d
commit ddc4d3bc90
6 changed files with 9 additions and 8 deletions

View File

@ -33,8 +33,6 @@ import static org.junit.Assert.*;
/** /**
* AbstractDefaultRepositoryContentTestCase * AbstractDefaultRepositoryContentTestCase
*/ */
@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
public abstract class AbstractDefaultRepositoryContentTestCase public abstract class AbstractDefaultRepositoryContentTestCase
extends AbstractRepositoryLayerTestCase extends AbstractRepositoryLayerTestCase
{ {

View File

@ -1,4 +1,4 @@
package org.apache.archiva.repository; package org.apache.archiva.metadata.repository.storage.maven2.conf;
/* /*
* Licensed to the Apache Software Foundation (ASF) under one * Licensed to the Apache Software Foundation (ASF) under one
@ -40,6 +40,7 @@ import java.util.Set;
public class MockConfiguration public class MockConfiguration
implements ArchivaConfiguration implements ArchivaConfiguration
{ {
private Configuration configuration = new Configuration(); private Configuration configuration = new Configuration();
private Set<RegistryListener> registryListeners = new HashSet<RegistryListener>(); private Set<RegistryListener> registryListeners = new HashSet<RegistryListener>();

View File

@ -37,7 +37,7 @@ import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
* *
*/ */
@RunWith( ArchivaSpringJUnit4ClassRunner.class ) @RunWith( ArchivaSpringJUnit4ClassRunner.class )
@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context.xml" } ) @ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml", "classpath:/spring-context-no-mock-conf.xml" } )
public abstract class AbstractRepositoryLayerTestCase public abstract class AbstractRepositoryLayerTestCase
{ {
@Rule @Rule

View File

@ -30,7 +30,7 @@ import org.apache.archiva.policies.ReleasesPolicy;
import org.apache.archiva.policies.SnapshotsPolicy; import org.apache.archiva.policies.SnapshotsPolicy;
import org.apache.archiva.repository.AbstractRepositoryLayerTestCase; import org.apache.archiva.repository.AbstractRepositoryLayerTestCase;
import org.apache.archiva.repository.ManagedRepositoryContent; import org.apache.archiva.repository.ManagedRepositoryContent;
import org.apache.archiva.repository.MockConfiguration; import org.apache.archiva.metadata.repository.storage.maven2.conf.MockConfiguration;
import org.apache.archiva.repository.RemoteRepositoryContent; import org.apache.archiva.repository.RemoteRepositoryContent;
import org.apache.archiva.repository.layout.LayoutException; import org.apache.archiva.repository.layout.LayoutException;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;

View File

@ -27,7 +27,7 @@
http://www.springframework.org/schema/context/spring-context-3.0.xsd" http://www.springframework.org/schema/context/spring-context-3.0.xsd"
default-lazy-init="true"> default-lazy-init="true">
<bean name="archivaConfiguration#mock" class="org.apache.archiva.repository.MockConfiguration"/> <bean name="archivaConfiguration#mock" class="org.apache.archiva.metadata.repository.storage.maven2.conf.MockConfiguration"/>
<alias name="archivaConfiguration#mock" alias="archivaConfiguration#default"/> <alias name="archivaConfiguration#mock" alias="archivaConfiguration#default"/>
<bean name="metadataTools#test" class="org.apache.archiva.repository.metadata.MetadataTools"> <bean name="metadataTools#test" class="org.apache.archiva.repository.metadata.MetadataTools">
<property name="configuration" ref="archivaConfiguration#mock"/> <property name="configuration" ref="archivaConfiguration#mock"/>

View File

@ -25,6 +25,8 @@
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"> http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<alias name="archivaConfiguration#mock" alias="archivaConfiguration#default"/>
<alias name="archivaConfiguration#mock" alias="archivaConfiguration#test"/> <context:annotation-config/>
<context:component-scan base-package="org.apache.archiva.metadata.repository.storage.maven2.conf"/>
</beans> </beans>