mirror of https://github.com/apache/archiva.git
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:
parent
206b66a2be
commit
8a68012d12
archiva-modules/archiva-base/archiva-proxy/src
main/java/org/apache/maven/archiva/proxy
test
java/org/apache/maven/archiva/proxy
resources
|
@ -110,6 +110,7 @@ public class DefaultRepositoryProxyConnectors
|
|||
* plexus.requirement
|
||||
*/
|
||||
@Inject
|
||||
@Named(value="metadataTools#default")
|
||||
private MetadataTools metadataTools;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue