aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-proxy-common/src/test/java
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-10-24 19:50:16 +0000
committerOlivier Lamy <olamy@apache.org>2012-10-24 19:50:16 +0000
commit4ba8af2e0ed8cb7395678da0814ecc9c914c60cc (patch)
treefee1dcb1da529309dd1827f490116fb0654cdd7d /archiva-modules/archiva-base/archiva-proxy-common/src/test/java
parent7b95f6c33c0c96c23d135e8962998fbbf4cea590 (diff)
downloadarchiva-4ba8af2e0ed8cb7395678da0814ecc9c914c60cc.tar.gz
archiva-4ba8af2e0ed8cb7395678da0814ecc9c914c60cc.zip
transform this interface to use a bean request will ease future enhancements
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1401843 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-proxy-common/src/test/java')
-rw-r--r--archiva-modules/archiva-base/archiva-proxy-common/src/test/java/org/apache/archiva/proxy/common/WagonFactoryTest.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy-common/src/test/java/org/apache/archiva/proxy/common/WagonFactoryTest.java b/archiva-modules/archiva-base/archiva-proxy-common/src/test/java/org/apache/archiva/proxy/common/WagonFactoryTest.java
index c8c7860f0..4937a56da 100644
--- a/archiva-modules/archiva-base/archiva-proxy-common/src/test/java/org/apache/archiva/proxy/common/WagonFactoryTest.java
+++ b/archiva-modules/archiva-base/archiva-proxy-common/src/test/java/org/apache/archiva/proxy/common/WagonFactoryTest.java
@@ -20,20 +20,19 @@ package org.apache.archiva.proxy.common;
*/
import junit.framework.TestCase;
+import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
import org.apache.maven.wagon.Wagon;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import javax.inject.Inject;
-import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
/**
* Test the WagonFactory works through Spring to be bound into the RepositoryProxyConnectors implementation.
- *
*/
-@RunWith( ArchivaSpringJUnit4ClassRunner.class )
-@ContextConfiguration( locations = { "classpath*:/META-INF/spring-context.xml" } )
+@RunWith ( ArchivaSpringJUnit4ClassRunner.class )
+@ContextConfiguration ( locations = { "classpath*:/META-INF/spring-context.xml" } )
public class WagonFactoryTest
extends TestCase
{
@@ -46,13 +45,13 @@ public class WagonFactoryTest
throws Exception
{
- Wagon first = factory.getWagon( "wagon#file" );
-
- Wagon second = factory.getWagon( "wagon#file" );
+ Wagon first = factory.getWagon( new WagonFactoryRequest().protocol( "wagon#file" ) );
+
+ Wagon second = factory.getWagon( new WagonFactoryRequest().protocol( "wagon#file" ) );
// ensure we support only protocol name too
- Wagon third = factory.getWagon( "file" );
-
+ Wagon third = factory.getWagon( new WagonFactoryRequest().protocol( "file" ) );
+
assertNotSame( first, second );
assertNotSame( first, third );