fix more unit tests

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135325 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-06-13 22:23:14 +00:00
parent fcf4879734
commit 44629e35f6
4 changed files with 22 additions and 12 deletions

View File

@ -98,7 +98,7 @@ public class RssFeedServlet
servletAuth = wac.getBean( ServletAuthenticator.class ); servletAuth = wac.getBean( ServletAuthenticator.class );
httpAuth = wac.getBean( "httpAuthenticator#basic", HttpAuthenticator.class ); httpAuth = wac.getBean( "httpAuthenticator#basic", HttpAuthenticator.class );
// TODO: what if there are other types? // TODO: what if there are other types?
repositorySessionFactory = wac.getBean( RepositorySessionFactory.class ); repositorySessionFactory = wac.getBean( "repositorySessionFactory", RepositorySessionFactory.class );
} }
public void doGet( HttpServletRequest req, HttpServletResponse res ) public void doGet( HttpServletRequest req, HttpServletResponse res )

View File

@ -64,7 +64,7 @@ public class SortRepositoriesActionTest
//action = (SortRepositoriesAction) lookup( Action.class.getName(), "sortRepositoriesAction" ); //action = (SortRepositoriesAction) lookup( Action.class.getName(), "sortRepositoriesAction" );
action = (SortRepositoriesAction) getActionProxy( "sortDownRepositoryFromGroup.action" ).getAction(); action = (SortRepositoriesAction) getActionProxy( "/admin/sortDownRepositoryFromGroup.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class ); archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock(); archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
action.setArchivaConfiguration( archivaConfiguration ); action.setArchivaConfiguration( archivaConfiguration );

View File

@ -28,22 +28,27 @@
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> </listener>
<context-param>
<param-name>contextClass</param-name>
<param-value>org.codehaus.redback.components.springutils.CachingWebApplicationContext</param-value>
</context-param>
<servlet> <servlet>
<servlet-name>RssFeedServlet</servlet-name> <servlet-name>RssFeedServlet</servlet-name>
<servlet-class>org.apache.maven.archiva.web.rss.RssFeedServlet</servlet-class> <servlet-class>org.apache.maven.archiva.web.rss.RssFeedServlet</servlet-class>
</servlet> </servlet>
<servlet-mapping> <servlet-mapping>
<servlet-name>RssFeedServlet</servlet-name> <servlet-name>RssFeedServlet</servlet-name>
<url-pattern>/feeds/*</url-pattern> <url-pattern>/feeds/*</url-pattern>
</servlet-mapping> </servlet-mapping>
<context-param> <context-param>
<param-name>contextConfigLocation</param-name> <param-name>contextConfigLocation</param-name>
<param-value> <param-value>
classpath*:/spring-context.xml classpath*:/spring-context.xml
classpath*:/META-INF/spring-context.xml classpath*:/META-INF/spring-context.xml
</param-value> </param-value>
</context-param> </context-param>

View File

@ -28,11 +28,16 @@
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> </listener>
<context-param> <context-param>
<param-name>contextClass</param-name>
<param-value>org.codehaus.redback.components.springutils.CachingWebApplicationContext</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name> <param-name>contextConfigLocation</param-name>
<param-value> <param-value>
classpath*:/spring-context.xml classpath*:/spring-context.xml
classpath*:/META-INF/spring-context.xml classpath*:/META-INF/spring-context.xml
</param-value> </param-value>
</context-param> </context-param>