mirror of https://github.com/apache/archiva.git
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:
parent
3f982d838d
commit
fcf4879734
|
@ -47,7 +47,7 @@ public class BrowseActionTest
|
||||||
|
|
||||||
public void testInstantiation()
|
public void testInstantiation()
|
||||||
{
|
{
|
||||||
assertFalse( action == (BrowseAction) getActionProxy( "browse" ).getAction() );
|
assertFalse( action == (BrowseAction) getActionProxy( "browse.action" ).getAction() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBrowse()
|
public void testBrowse()
|
||||||
|
@ -391,7 +391,7 @@ public class BrowseActionTest
|
||||||
{
|
{
|
||||||
super.setUp();
|
super.setUp();
|
||||||
//action = (BrowseAction) lookup( Action.class, ACTION_HINT );
|
//action = (BrowseAction) lookup( Action.class, ACTION_HINT );
|
||||||
action = (BrowseAction) getActionProxy( "browse" ).getAction();
|
action = (BrowseAction) getActionProxy( "browse.action" ).getAction();
|
||||||
metadataResolver = new TestMetadataResolver();
|
metadataResolver = new TestMetadataResolver();
|
||||||
RepositorySession repositorySession = mock( RepositorySession.class );
|
RepositorySession repositorySession = mock( RepositorySession.class );
|
||||||
when( repositorySession.getResolver() ).thenReturn( metadataResolver );
|
when( repositorySession.getResolver() ).thenReturn( metadataResolver );
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class DeleteArtifactActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (DeleteArtifactAction) lookup( Action.class.getName(), "deleteArtifactAction" );
|
//action = (DeleteArtifactAction) lookup( Action.class.getName(), "deleteArtifactAction" );
|
||||||
action = (DeleteArtifactAction) getActionProxy( "/deleteArtifact" ).getAction();
|
action = (DeleteArtifactAction) getActionProxy( "/deleteArtifact.action" ).getAction();
|
||||||
assertNotNull( action );
|
assertNotNull( action );
|
||||||
|
|
||||||
configurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
configurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class ShowArtifactActionTest
|
||||||
|
|
||||||
public void testInstantiation()
|
public void testInstantiation()
|
||||||
{
|
{
|
||||||
assertFalse( action == getActionProxy( "/showArtifact" ).getAction() );
|
assertFalse( action == getActionProxy( "/showArtifact.action" ).getAction() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetArtifactUniqueRelease()
|
public void testGetArtifactUniqueRelease()
|
||||||
|
@ -631,7 +631,7 @@ public class ShowArtifactActionTest
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
super.setUp();
|
super.setUp();
|
||||||
action = (ShowArtifactAction) getActionProxy( "/showArtifact" ).getAction();
|
action = (ShowArtifactAction) getActionProxy( "/showArtifact.action" ).getAction();
|
||||||
|
|
||||||
metadataResolver = new TestMetadataResolver();
|
metadataResolver = new TestMetadataResolver();
|
||||||
MetadataRepository repo = mock( MetadataRepository.class );
|
MetadataRepository repo = mock( MetadataRepository.class );
|
||||||
|
|
|
@ -209,6 +209,6 @@ public class EditOrganizationInfoActionTest
|
||||||
protected AbstractAppearanceAction getAction()
|
protected AbstractAppearanceAction getAction()
|
||||||
{
|
{
|
||||||
//return (EditOrganisationInfoAction) lookup( Action.class.getName(), "editOrganisationInfo" );
|
//return (EditOrganisationInfoAction) lookup( Action.class.getName(), "editOrganisationInfo" );
|
||||||
return (EditOrganisationInfoAction) getActionProxy( "/admin/editOrganisationInfo" ).getAction();
|
return (EditOrganisationInfoAction) getActionProxy( "/admin/editOrganisationInfo.action" ).getAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,6 @@ public class OrganizationInfoActionTest
|
||||||
{
|
{
|
||||||
//return (OrganisationInfoAction) lookup( Action.class.getName(), "organisationInfo" );
|
//return (OrganisationInfoAction) lookup( Action.class.getName(), "organisationInfo" );
|
||||||
|
|
||||||
return (OrganisationInfoAction) getActionProxy( "/admin/organisationInfo" ).getAction();
|
return (OrganisationInfoAction) getActionProxy( "/admin/organisationInfo.action" ).getAction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class AddProxyConnectorActionTest
|
||||||
{
|
{
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
action = (AddProxyConnectorAction) getActionProxy( "addProxyConnector" ).getAction();
|
action = (AddProxyConnectorAction) getActionProxy( "/admin/addProxyConnector.action" ).getAction();
|
||||||
//action = (AddProxyConnectorAction) lookup( Action.class.getName(), "addProxyConnectorAction" );
|
//action = (AddProxyConnectorAction) lookup( Action.class.getName(), "addProxyConnectorAction" );
|
||||||
|
|
||||||
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class DeleteProxyConnectorActionTest
|
||||||
|
|
||||||
//action = (DeleteProxyConnectorAction) lookup( Action.class.getName(), "deleteProxyConnectorAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -213,7 +213,7 @@ public class DisableProxyConnectorActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (DisableProxyConnectorAction) lookup( Action.class.getName(), "disableProxyConnectorAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -433,7 +433,7 @@ public class EditProxyConnectorActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (EditProxyConnectorAction) lookup( Action.class.getName(), "editProxyConnectorAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -211,7 +211,7 @@ public class EnableProxyConnectorActionTest extends AbstractWebworkTestCase
|
||||||
|
|
||||||
//action = (EnableProxyConnectorAction) lookup( Action.class.getName(), "enableProxyConnectorAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
action.setArchivaConfiguration( archivaConfiguration );
|
action.setArchivaConfiguration( archivaConfiguration );
|
||||||
|
|
|
@ -243,7 +243,7 @@ public class SortProxyConnectorsActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (SortProxyConnectorsAction) lookup( Action.class.getName(), "sortProxyConnectorsAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class AddRemoteRepositoryActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (AddRemoteRepositoryAction) lookup( Action.class.getName(), "addRemoteRepositoryAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class DeleteRemoteRepositoryActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (DeleteRemoteRepositoryAction) lookup( Action.class.getName(), "deleteRemoteRepositoryAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class DeleteRepositoryGroupActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (DeleteRepositoryGroupAction) lookup ( Action.class.getName(), "deleteRepositoryGroupAction" );
|
//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 );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class EditRemoteRepositoryActionTest
|
||||||
|
|
||||||
//action = (EditRemoteRepositoryAction) lookup( Action.class.getName(), "editRemoteRepositoryAction" );
|
//action = (EditRemoteRepositoryAction) lookup( Action.class.getName(), "editRemoteRepositoryAction" );
|
||||||
|
|
||||||
action = (EditRemoteRepositoryAction) getActionProxy( "editRemoteRepository" ).getAction();
|
action = (EditRemoteRepositoryAction) getActionProxy( "editRemoteRepository.action" ).getAction();
|
||||||
|
|
||||||
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class RepositoriesActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (RepositoriesAction) lookup( Action.class.getName(), "repositoriesAction" );
|
//action = (RepositoriesAction) lookup( Action.class.getName(), "repositoriesAction" );
|
||||||
action = (RepositoriesAction) getActionProxy( "/admin/index" ).getAction();
|
action = (RepositoriesAction) getActionProxy( "/admin/index.action" ).getAction();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class RepositoryGroupsActionTest
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
//action = (RepositoryGroupsAction) lookup( Action.class.getName(), "repositoryGroupsAction" );
|
//action = (RepositoryGroupsAction) lookup( Action.class.getName(), "repositoryGroupsAction" );
|
||||||
action = (RepositoryGroupsAction) getActionProxy( "/admin/repositoryGroups" );
|
action = (RepositoryGroupsAction) getActionProxy( "/admin/repositoryGroups.action" );
|
||||||
|
|
||||||
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class SortRepositoriesActionTest
|
||||||
|
|
||||||
//action = (SortRepositoriesAction) lookup( Action.class.getName(), "sortRepositoriesAction" );
|
//action = (SortRepositoriesAction) lookup( Action.class.getName(), "sortRepositoriesAction" );
|
||||||
|
|
||||||
action = (SortRepositoriesAction) getActionProxy( "sortDownRepositoryFromGroup" ).getAction();
|
action = (SortRepositoriesAction) getActionProxy( "sortDownRepositoryFromGroup.action" ).getAction();
|
||||||
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
archivaConfigurationControl = MockControl.createControl( ArchivaConfiguration.class );
|
||||||
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
archivaConfiguration = (ArchivaConfiguration) archivaConfigurationControl.getMock();
|
||||||
action.setArchivaConfiguration( archivaConfiguration );
|
action.setArchivaConfiguration( archivaConfiguration );
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class GenerateReportActionTest
|
||||||
|
|
||||||
//action = (GenerateReportAction) lookup( Action.class, "generateReport" );
|
//action = (GenerateReportAction) lookup( Action.class, "generateReport" );
|
||||||
|
|
||||||
action = (GenerateReportAction) getActionProxy( "/admin/generateReport" ).getAction();
|
action = (GenerateReportAction) getActionProxy( "/admin/generateReport.action" ).getAction();
|
||||||
|
|
||||||
repositoryStatisticsManagerControl = MockControl.createControl( RepositoryStatisticsManager.class );
|
repositoryStatisticsManagerControl = MockControl.createControl( RepositoryStatisticsManager.class );
|
||||||
repositoryStatisticsManager = (RepositoryStatisticsManager) repositoryStatisticsManagerControl.getMock();
|
repositoryStatisticsManager = (RepositoryStatisticsManager) repositoryStatisticsManagerControl.getMock();
|
||||||
|
|
Loading…
Reference in New Issue