From: Olivier Lamy Date: Mon, 9 Jan 2012 21:46:25 +0000 (+0000) Subject: more fix junit due to ArrayList init mock call number changed X-Git-Tag: archiva-1.4-M3~1612 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=79d7b163de5bf335b7bd34b66a57f6d9ec2e5a93;p=archiva.git more fix junit due to ArrayList init mock call number changed git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1229368 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java index faa2c7875..cce27b900 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/DeleteRepositoryGroupActionTest.java @@ -81,7 +81,7 @@ public class DeleteRepositoryGroupActionTest Configuration configuration = createConfigurationForEditing( origRepoGroup ); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration ); + archivaConfigurationControl.setReturnValue( configuration, 2 ); archivaConfigurationControl.replay(); action.setRepoGroupId( REPO_GROUP_ID ); @@ -100,7 +100,7 @@ public class DeleteRepositoryGroupActionTest Configuration configuration = createConfigurationForEditing( createRepositoryGroup() ); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 5 ); + archivaConfigurationControl.setReturnValue( configuration, 7 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay(); @@ -125,7 +125,7 @@ public class DeleteRepositoryGroupActionTest Configuration configuration = createConfigurationForEditing( origRepoGroup ); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 2 ); + archivaConfigurationControl.setReturnValue( configuration, 4 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay(); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java index 961d2ba52..37d727468 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/EditRemoteRepositoryActionTest.java @@ -74,9 +74,7 @@ public class EditRemoteRepositoryActionTest { Configuration configuration = createConfigurationForEditing( createRepository() ); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration ); - archivaConfigurationControl.setReturnValue( configuration ); - archivaConfigurationControl.setReturnValue( configuration ); + archivaConfigurationControl.setReturnValue( configuration, 4, 6 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay(); @@ -106,7 +104,7 @@ public class EditRemoteRepositoryActionTest Configuration configuration = createConfigurationForEditing( createRepository() ); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration ); + archivaConfigurationControl.setReturnValue( configuration, 2 ); archivaConfigurationControl.replay(); action.setRepoid( REPO_ID ); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java index 655fa7ba9..80c64ba85 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/java/org/apache/archiva/web/action/admin/repositories/RepositoryGroupsActionTest.java @@ -76,7 +76,7 @@ public class RepositoryGroupsActionTest throws SecureActionException, RepositoryAdminException { archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( new Configuration(), 3 ); + archivaConfigurationControl.setReturnValue( new Configuration(), 3, 5 ); archivaConfigurationControl.replay(); action.prepare(); @@ -90,7 +90,7 @@ public class RepositoryGroupsActionTest { Configuration configuration = new Configuration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 6 ); + archivaConfigurationControl.setReturnValue( configuration, 6, 8 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay(); @@ -113,7 +113,7 @@ public class RepositoryGroupsActionTest { Configuration configuration = new Configuration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 5 ); + archivaConfigurationControl.setReturnValue( configuration, 5, 7 ); archivaConfiguration.save( configuration ); @@ -132,7 +132,7 @@ public class RepositoryGroupsActionTest { Configuration configuration = new Configuration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 8 ); + archivaConfigurationControl.setReturnValue( configuration, 10, 12 ); archivaConfiguration.save( configuration ); @@ -165,7 +165,7 @@ public class RepositoryGroupsActionTest Configuration configuration = createInitialConfiguration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 6 ); + archivaConfigurationControl.setReturnValue( configuration, 6, 8 ); archivaConfigurationControl.replay(); action.setServletRequest( sc.newInvocation( "http://localhost/admin/repositoryGroups.action" ).getRequest() ); @@ -197,7 +197,7 @@ public class RepositoryGroupsActionTest Configuration configuration = createInitialConfiguration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 17 ); + archivaConfigurationControl.setReturnValue( configuration, 20, 24 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay(); @@ -246,7 +246,7 @@ public class RepositoryGroupsActionTest Configuration configuration = createInitialConfiguration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 13 ); + archivaConfigurationControl.setReturnValue( configuration, 19, 22 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay(); @@ -297,7 +297,7 @@ public class RepositoryGroupsActionTest Configuration configuration = createInitialConfiguration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 6 ); + archivaConfigurationControl.setReturnValue( configuration, 6, 10 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay(); @@ -333,7 +333,7 @@ public class RepositoryGroupsActionTest Configuration configuration = createInitialConfiguration(); archivaConfiguration.getConfiguration(); - archivaConfigurationControl.setReturnValue( configuration, 6 ); + archivaConfigurationControl.setReturnValue( configuration, 6, 10 ); archivaConfiguration.save( configuration ); archivaConfigurationControl.replay();