From 439563bdb022c28d798abde0323f5da252596f56 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 2 Apr 2012 22:23:42 +0000 Subject: [PATCH] fix mock call git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1308601 13f79535-47bb-0310-9956-ffa450edef68 --- .../admin/repositories/EditManagedRepositoryActionTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java index 2dcb8f7d8..b4b2e2d4f 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditManagedRepositoryActionTest.java @@ -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 ); -- 2.39.5