]> source.dussan.org Git - archiva.git/commitdiff
fix mock call
authorOlivier Lamy <olamy@apache.org>
Mon, 2 Apr 2012 22:23:42 +0000 (22:23 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 2 Apr 2012 22:23:42 +0000 (22:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308601 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java

index 2dcb8f7d8302527b95a21b029925fe9feb8c6673..b4b2e2d4f8c99e900b8c47738650f376a504fb24 100644 (file)
@@ -102,7 +102,7 @@ public class EditManagedRepositoryActionTest
         repositoryTaskSchedulerControl = MockClassControl.createControl( RepositoryArchivaTaskScheduler.class );
         repositoryTaskScheduler = (RepositoryArchivaTaskScheduler) repositoryTaskSchedulerControl.getMock();
 
-        location = new File( "target/test/location" );
+        location = new File( System.getProperty( "basedir", "target/test/location" ) );
 
         metadataRepository = mock( MetadataRepository.class );
         RepositorySession repositorySession = mock( RepositorySession.class );
@@ -308,6 +308,9 @@ public class EditManagedRepositoryActionTest
 
         roleManagerControl.replay();
 
+        registry.getString( "appserver.base" );
+        registryControl.setReturnValue( "target/test", 1, 3 );
+
         registry.getString( "appserver.base", "${appserver.base}" );
         registryControl.setReturnValue( "target/test", 1, 3 );
         registry.getString( "appserver.home", "${appserver.home}" );
@@ -326,6 +329,7 @@ public class EditManagedRepositoryActionTest
 
         Configuration configuration = createConfigurationForEditing( createRepository() );
         archivaConfiguration.getConfiguration();
+
         archivaConfigurationControl.setReturnValue( configuration );
         archivaConfigurationControl.setReturnValue( configuration );
         archivaConfigurationControl.setReturnValue( configuration );