fix more test in webapp module

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1135307 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2011-06-13 21:50:10 +00:00
parent 3f982d838d
commit fcf4879734
19 changed files with 21 additions and 21 deletions

View File

@ -47,7 +47,7 @@ public class BrowseActionTest
public void testInstantiation()
{
assertFalse( action == (BrowseAction) getActionProxy( "browse" ).getAction() );
assertFalse( action == (BrowseAction) getActionProxy( "browse.action" ).getAction() );
}
public void testBrowse()
@ -391,7 +391,7 @@ public class BrowseActionTest
{
super.setUp();
//action = (BrowseAction) lookup( Action.class, ACTION_HINT );
action = (BrowseAction) getActionProxy( "browse" ).getAction();
action = (BrowseAction) getActionProxy( "browse.action" ).getAction();
metadataResolver = new TestMetadataResolver();
RepositorySession repositorySession = mock( RepositorySession.class );
when( repositorySession.getResolver() ).thenReturn( metadataResolver );

View File

@ -82,7 +82,7 @@ public class DeleteArtifactActionTest
super.setUp();
//action = (DeleteArtifactAction) lookup( Action.class.getName(), "deleteArtifactAction" );
action = (DeleteArtifactAction) getActionProxy( "/deleteArtifact" ).getAction();
action = (DeleteArtifactAction) getActionProxy( "/deleteArtifact.action" ).getAction();
assertNotNull( action );
configurationControl = MockControl.createControl( ArchivaConfiguration.class );

View File

@ -73,7 +73,7 @@ public class ShowArtifactActionTest
public void testInstantiation()
{
assertFalse( action == getActionProxy( "/showArtifact" ).getAction() );
assertFalse( action == getActionProxy( "/showArtifact.action" ).getAction() );
}
public void testGetArtifactUniqueRelease()
@ -631,7 +631,7 @@ public class ShowArtifactActionTest
throws Exception
{
super.setUp();
action = (ShowArtifactAction) getActionProxy( "/showArtifact" ).getAction();
action = (ShowArtifactAction) getActionProxy( "/showArtifact.action" ).getAction();
metadataResolver = new TestMetadataResolver();
MetadataRepository repo = mock( MetadataRepository.class );

View File

@ -209,6 +209,6 @@ public class EditOrganizationInfoActionTest
protected AbstractAppearanceAction getAction()
{
//return (EditOrganisationInfoAction) lookup( Action.class.getName(), "editOrganisationInfo" );
return (EditOrganisationInfoAction) getActionProxy( "/admin/editOrganisationInfo" ).getAction();
return (EditOrganisationInfoAction) getActionProxy( "/admin/editOrganisationInfo.action" ).getAction();
}
}

View File

@ -51,6 +51,6 @@ public class OrganizationInfoActionTest
{
//return (OrganisationInfoAction) lookup( Action.class.getName(), "organisationInfo" );
return (OrganisationInfoAction) getActionProxy( "/admin/organisationInfo" ).getAction();
return (OrganisationInfoAction) getActionProxy( "/admin/organisationInfo.action" ).getAction();
}
}

View File

@ -60,7 +60,7 @@ public class AddProxyConnectorActionTest
{
super.setUp();
action = (AddProxyConnectorAction) getActionProxy( "addProxyConnector" ).getAction();
action = (AddProxyConnectorAction) getActionProxy( "/admin/addProxyConnector.action" ).getAction();
//action = (AddProxyConnectorAction) lookup( Action.class.getName(), "addProxyConnectorAction" );
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );

View File

@ -217,7 +217,7 @@ public class DeleteProxyConnectorActionTest
//action = (DeleteProxyConnectorAction) lookup( Action.class.getName(), "deleteProxyConnectorAction" );
action = (DeleteProxyConnectorAction) getActionProxy( "/admin/deleteProxyConnector" ).getAction();
action = (DeleteProxyConnectorAction) getActionProxy( "/admin/deleteProxyConnector.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -213,7 +213,7 @@ public class DisableProxyConnectorActionTest
super.setUp();
//action = (DisableProxyConnectorAction) lookup( Action.class.getName(), "disableProxyConnectorAction" );
action = (DisableProxyConnectorAction) getActionProxy( "/admin/disableProxyConnector" ).getAction();
action = (DisableProxyConnectorAction) getActionProxy( "/admin/disableProxyConnector.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -433,7 +433,7 @@ public class EditProxyConnectorActionTest
super.setUp();
//action = (EditProxyConnectorAction) lookup( Action.class.getName(), "editProxyConnectorAction" );
action = (EditProxyConnectorAction) getActionProxy( "/admin/editProxyConnector" ).getAction();
action = (EditProxyConnectorAction) getActionProxy( "/admin/editProxyConnector.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -211,7 +211,7 @@ public class EnableProxyConnectorActionTest extends AbstractWebworkTestCase
//action = (EnableProxyConnectorAction) lookup( Action.class.getName(), "enableProxyConnectorAction" );
action = (EnableProxyConnectorAction) getActionProxy( "/admin/enableProxyConnector" ).getAction();
action = (EnableProxyConnectorAction) getActionProxy( "/admin/enableProxyConnector.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
action.setArchivaConfiguration( archivaConfiguration );

View File

@ -243,7 +243,7 @@ public class SortProxyConnectorsActionTest
super.setUp();
//action = (SortProxyConnectorsAction) lookup( Action.class.getName(), "sortProxyConnectorsAction" );
action = (SortProxyConnectorsAction) getActionProxy( "/admin/sortProxyConnectors" ).getAction();
action = (SortProxyConnectorsAction) getActionProxy( "/admin/sortProxyConnectors.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -52,7 +52,7 @@ public class AddRemoteRepositoryActionTest
super.setUp();
//action = (AddRemoteRepositoryAction) lookup( Action.class.getName(), "addRemoteRepositoryAction" );
action = (AddRemoteRepositoryAction) getActionProxy( "/admin/addRemoteRepository" ).getAction();
action = (AddRemoteRepositoryAction) getActionProxy( "/admin/addRemoteRepository.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -54,7 +54,7 @@ public class DeleteRemoteRepositoryActionTest
super.setUp();
//action = (DeleteRemoteRepositoryAction) lookup( Action.class.getName(), "deleteRemoteRepositoryAction" );
action = (DeleteRemoteRepositoryAction) getActionProxy( "/admin/deleteRemoteRepository" ).getAction();
action = (DeleteRemoteRepositoryAction) getActionProxy( "/admin/deleteRemoteRepository.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -50,7 +50,7 @@ public class DeleteRepositoryGroupActionTest
super.setUp();
//action = (DeleteRepositoryGroupAction) lookup ( Action.class.getName(), "deleteRepositoryGroupAction" );
action = (DeleteRepositoryGroupAction) getActionProxy( "/admin/deleteRepositoryGroup" ).getAction();
action = (DeleteRepositoryGroupAction) getActionProxy( "/admin/deleteRepositoryGroup.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -155,7 +155,7 @@ public class EditRemoteRepositoryActionTest
//action = (EditRemoteRepositoryAction) lookup( Action.class.getName(), "editRemoteRepositoryAction" );
action = (EditRemoteRepositoryAction) getActionProxy( "editRemoteRepository" ).getAction();
action = (EditRemoteRepositoryAction) getActionProxy( "editRemoteRepository.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -50,7 +50,7 @@ public class RepositoriesActionTest
super.setUp();
//action = (RepositoriesAction) lookup( Action.class.getName(), "repositoriesAction" );
action = (RepositoriesAction) getActionProxy( "/admin/index" ).getAction();
action = (RepositoriesAction) getActionProxy( "/admin/index.action" ).getAction();
}

View File

@ -60,7 +60,7 @@ public class RepositoryGroupsActionTest
super.setUp();
//action = (RepositoryGroupsAction) lookup( Action.class.getName(), "repositoryGroupsAction" );
action = (RepositoryGroupsAction) getActionProxy( "/admin/repositoryGroups" );
action = (RepositoryGroupsAction) getActionProxy( "/admin/repositoryGroups.action" );
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();

View File

@ -64,7 +64,7 @@ public class SortRepositoriesActionTest
//action = (SortRepositoriesAction) lookup( Action.class.getName(), "sortRepositoriesAction" );
action = (SortRepositoriesAction) getActionProxy( "sortDownRepositoryFromGroup" ).getAction();
action = (SortRepositoriesAction) getActionProxy( "sortDownRepositoryFromGroup.action" ).getAction();
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
action.setArchivaConfiguration( archivaConfiguration );

View File

@ -75,7 +75,7 @@ public class GenerateReportActionTest
//action = (GenerateReportAction) lookup( Action.class, "generateReport" );
action = (GenerateReportAction) getActionProxy( "/admin/generateReport" ).getAction();
action = (GenerateReportAction) getActionProxy( "/admin/generateReport.action" ).getAction();
repositoryStatisticsManagerControl = MockControl.createControl( RepositoryStatisticsManager.class );
repositoryStatisticsManager = (RepositoryStatisticsManager) repositoryStatisticsManagerControl.getMock();