aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2011-05-28 22:15:13 +0000
committerOlivier Lamy <olamy@apache.org>2011-05-28 22:15:13 +0000
commitcc963c71da896976e08c48d7ba34d5be2d8b3a14 (patch)
treef3640cb0b0e74092c70f1d7b267d2e2e204f6a2a /archiva-modules
parent67af3bcb6a88f68c511c327ea534b5dcbd8cfdd0 (diff)
downloadarchiva-cc963c71da896976e08c48d7ba34d5be2d8b3a14.tar.gz
archiva-cc963c71da896976e08c48d7ba34d5be2d8b3a14.zip
fix MetadataTransferTest units
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1128784 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java6
-rw-r--r--archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java8
2 files changed, 11 insertions, 3 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
index d71e396d5..a2135c48d 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
@@ -40,6 +40,8 @@ import org.easymock.ArgumentsMatcher;
import org.easymock.MockControl;
import org.junit.Before;
import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -120,6 +122,8 @@ public abstract class AbstractProxyTestCase
protected MockConfiguration config;
+ protected Logger log = LoggerFactory.getLogger( getClass() );
+
WagonDelegate delegate;
@Inject
@@ -187,7 +191,7 @@ public abstract class AbstractProxyTestCase
delegate.setDelegate( wagonMock );
- System.out.println( "\n.\\ " + getName() + "() \\._________________________________________\n" );
+ log.info( "\n.\\ " + getName() + "() \\._________________________________________\n" );
}
@Override
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
index 09a6de673..ebcf5cb4e 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/MetadataTransferTest.java
@@ -41,6 +41,7 @@ import org.custommonkey.xmlunit.Diff;
import org.junit.Before;
import org.junit.Test;
+import javax.inject.Inject;
import java.io.File;
import java.io.StringWriter;
import java.util.ArrayList;
@@ -95,14 +96,15 @@ public class MetadataTransferTest
extends AbstractProxyTestCase
{
+ @Inject
private MetadataTools metadataTools;
@Before
public void init()
throws Exception
{
- super.setUp();
- metadataTools = applicationContext.getBean( MetadataTools.class );
+ //super.setUp();
+ //metadataTools = applicationContext.getBean( MetadataTools.class );
}
@Test
@@ -187,6 +189,8 @@ public class MetadataTransferTest
String requestedResource = "org/apache/maven/test/get-default-metadata-nonexistant/maven-metadata.xml";
setupTestableManagedRepository( requestedResource );
+ config.getConfiguration().setProxyConnectors( new ArrayList<ProxyConnectorConfiguration>( ) );
+
assertResourceNotFound( requestedResource );
// No proxy setup, nothing fetched, failure expected.