]> source.dussan.org Git - archiva.git/commitdiff
fix mock call number in webapp unit tests
authorOlivier Lamy <olamy@apache.org>
Mon, 16 Jan 2012 11:36:16 +0000 (11:36 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 16 Jan 2012 11:36:16 +0000 (11:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1231943 13f79535-47bb-0310-9956-ffa450edef68

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

index da6c98c299fb2fbf6815ac26f4dbaae7bd8bfad7..8eeba40bdf110f1bee5b817500ad1e6b31cb8580 100644 (file)
@@ -171,14 +171,9 @@ public class AddManagedRepositoryActionTest
         roleManagerControl.replay();
 
         registry.getString( "appserver.base", "${appserver.base}" );
-        registryControl.setReturnValue( "target/test" );
+        registryControl.setReturnValue( "target/test", 1, 3 );
         registry.getString( "appserver.home", "${appserver.home}" );
-        registryControl.setReturnValue( "target/test" );
-
-        registry.getString( "appserver.base", "${appserver.base}" );
-        registryControl.setReturnValue( "target/test" );
-        registry.getString( "appserver.home", "${appserver.home}" );
-        registryControl.setReturnValue( "target/test" );
+        registryControl.setReturnValue( "target/test", 1, 3 );
 
         registryControl.replay();
 
index 224cf12f3be48e761859026ef019acafb7a17ce6..fe16df9f4edd6744a29ae14fffd41876dc91af19 100644 (file)
@@ -25,18 +25,18 @@ import org.apache.archiva.admin.model.beans.ManagedRepository;
 import org.apache.archiva.admin.repository.RepositoryCommonValidator;
 import org.apache.archiva.admin.repository.managed.DefaultManagedRepositoryAdmin;
 import org.apache.archiva.audit.AuditListener;
+import org.apache.archiva.configuration.ArchivaConfiguration;
+import org.apache.archiva.configuration.Configuration;
+import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.archiva.metadata.repository.MetadataRepository;
 import org.apache.archiva.metadata.repository.RepositorySession;
-import org.apache.archiva.security.common.ArchivaRoleConstants;
-import org.apache.archiva.webtest.memory.TestRepositorySessionFactory;
 import org.apache.archiva.metadata.repository.stats.RepositoryStatisticsManager;
 import org.apache.archiva.scheduler.repository.RepositoryArchivaTaskScheduler;
 import org.apache.archiva.scheduler.repository.RepositoryTask;
+import org.apache.archiva.security.common.ArchivaRoleConstants;
 import org.apache.archiva.web.validator.utils.ValidatorUtil;
+import org.apache.archiva.webtest.memory.TestRepositorySessionFactory;
 import org.apache.commons.io.FileUtils;
-import org.apache.archiva.configuration.ArchivaConfiguration;
-import org.apache.archiva.configuration.Configuration;
-import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.plexus.registry.Registry;
 import org.codehaus.redback.integration.interceptor.SecureActionBundle;
@@ -205,14 +205,9 @@ public class EditManagedRepositoryActionTest
         roleManagerControl.replay();
 
         registry.getString( "appserver.base", "${appserver.base}" );
-        registryControl.setReturnValue( "target/test" );
-        registry.getString( "appserver.home", "${appserver.home}" );
-        registryControl.setReturnValue( "target/test" );
-
-        registry.getString( "appserver.base", "${appserver.base}" );
-        registryControl.setReturnValue( "target/test" );
+        registryControl.setReturnValue( "target/test", 1, 3 );
         registry.getString( "appserver.home", "${appserver.home}" );
-        registryControl.setReturnValue( "target/test" );
+        registryControl.setReturnValue( "target/test", 1, 3 );
 
         registryControl.replay();
 
@@ -314,14 +309,9 @@ public class EditManagedRepositoryActionTest
         roleManagerControl.replay();
 
         registry.getString( "appserver.base", "${appserver.base}" );
-        registryControl.setReturnValue( "target/test" );
-        registry.getString( "appserver.home", "${appserver.home}" );
-        registryControl.setReturnValue( "target/test" );
-
-        registry.getString( "appserver.base", "${appserver.base}" );
-        registryControl.setReturnValue( "target/test" );
+        registryControl.setReturnValue( "target/test", 1, 3 );
         registry.getString( "appserver.home", "${appserver.home}" );
-        registryControl.setReturnValue( "target/test" );
+        registryControl.setReturnValue( "target/test", 1, 3 );
 
         registryControl.replay();