fix more spring test configuration

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1129801 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-05-31 17:01:09 +00:00
parent 206b66a2be
commit 8a68012d12
4 changed files with 8 additions and 2 deletions
archiva-modules/archiva-base/archiva-proxy/src
main/java/org/apache/maven/archiva/proxy
test

View File

@ -110,6 +110,7 @@ public class DefaultRepositoryProxyConnectors
* plexus.requirement
*/
@Inject
@Named(value="metadataTools#default")
private MetadataTools metadataTools;
@Inject

View File

@ -47,7 +47,6 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.inject.Inject;
import javax.inject.Named;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -89,7 +88,7 @@ public class HttpProxyTransferTest
{
super.setUp();
proxyHandler = applicationContext.getBean( RepositoryProxyConnectors.class );
proxyHandler = applicationContext.getBean( "repositoryProxyConnectors#test", RepositoryProxyConnectors.class );
config =
(MockConfiguration) applicationContext.getBean( "archivaConfiguration#mock", ArchivaConfiguration.class );

View File

@ -42,6 +42,7 @@ import org.junit.Before;
import org.junit.Test;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.File;
import java.io.StringWriter;
import java.util.ArrayList;
@ -97,6 +98,7 @@ public class MetadataTransferTest
{
@Inject
@Named(value = "metadataTools#mocked")
private MetadataTools metadataTools;
@Before

View File

@ -53,12 +53,16 @@
<bean name="repositoryProxyConnectors#test" class="org.apache.maven.archiva.proxy.DefaultRepositoryProxyConnectors">
<property name="archivaConfiguration" ref="archivaConfiguration#mock"/>
<property name="repositoryFactory" ref="repositoryContentFactory#mocked"/>
<property name="metadataTools" ref="metadataTools#mocked"/>
</bean>
<bean name="metadataTools#default" class="org.apache.maven.archiva.repository.metadata.MetadataTools">
<property name="configuration" ref="archivaConfiguration#mock"/>
</bean>
<bean name="metadataTools#mocked" class="org.apache.maven.archiva.repository.metadata.MetadataTools">
<property name="configuration" ref="archivaConfiguration#mock"/>
</bean>
</beans>