From: Olivier Lamy Date: Tue, 14 Jun 2011 16:51:45 +0000 (+0000) Subject: fix junit GenerateReportActionTest X-Git-Tag: archiva-1.4-M1~637 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e1d9dfbee5f1cb8cc250df15beda9ea8c938080c;p=archiva.git fix junit GenerateReportActionTest git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135696 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java index c1144c2a9..6bc27bd8f 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/maven/archiva/web/action/reports/GenerateReportActionTest.java @@ -93,9 +93,8 @@ public class GenerateReportActionTest RepositorySession repositorySession = mock( RepositorySession.class ); when( repositorySession.getRepository() ).thenReturn( metadataRepository ); - //TestRepositorySessionFactory factory = (TestRepositorySessionFactory) lookup( RepositorySessionFactory.class ); - - TestRepositorySessionFactory factory = new TestRepositorySessionFactory(); + TestRepositorySessionFactory factory = + applicationContext.getBean( "repositorySessionFactory#test", TestRepositorySessionFactory.class ); factory.setRepositorySession( repositorySession ); }