You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2011/05/27 23:24:53 UTC
svn commit: r1128463 - in
/archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test:
java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
resources/META-INF/plexus/ resources/META-INF/plexus/components.xml
Author: olamy
Date: Fri May 27 21:24:52 2011
New Revision: 1128463
URL: http://svn.apache.org/viewvc?rev=1128463&view=rev
Log:
fix use of delegate wagon in unit tests
Added:
archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/
archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/components.xml (with props)
Modified:
archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
Modified: archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java?rev=1128463&r1=1128462&r2=1128463&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java (original)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/maven/archiva/proxy/AbstractProxyTestCase.java Fri May 27 21:24:52 2011
@@ -20,6 +20,7 @@ package org.apache.maven.archiva.proxy;
*/
import junit.framework.TestCase;
+import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
@@ -118,10 +119,11 @@ public abstract class AbstractProxyTestC
protected MockConfiguration config;
- @Inject
- @Named( value = "wagon#test" )
WagonDelegate delegate;
+ @Inject
+ PlexusSisuBridge plexusSisuBridge;
+
@Before
public void setUp()
throws Exception
@@ -180,6 +182,8 @@ public abstract class AbstractProxyTestC
wagonMockControl = MockControl.createNiceControl( Wagon.class );
wagonMock = (Wagon) wagonMockControl.getMock();
+ delegate = (WagonDelegate) plexusSisuBridge.lookup( Wagon.class, "test" );
+
delegate.setDelegate( wagonMock );
System.out.println( "\n.\\ " + getName() + "() \\._________________________________________\n" );
Added: archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/components.xml?rev=1128463&view=auto
==============================================================================
--- archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/components.xml (added)
+++ archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/components.xml Fri May 27 21:24:52 2011
@@ -0,0 +1,28 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<component-set>
+ <components>
+ <component>
+ <role>org.apache.maven.wagon.Wagon</role>
+ <role-hint>test</role-hint>
+ <implementation>org.apache.maven.archiva.proxy.WagonDelegate</implementation>
+ </component>
+ </components>
+</component-set>
Propchange: archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: archiva/trunk/archiva-modules/archiva-base/archiva-proxy/src/test/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision