From 54c2d3d51d429441b6927edd477875a550c7f8c7 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Mon, 30 Nov 2015 17:27:23 +0100 Subject: [PATCH] Rename api/ce actions for consistency --- ...ActivityWsAction.java => ActivityAction.java} | 4 ++-- .../{CancelWsAction.java => CancelAction.java} | 4 ++-- ...ncelAllWsAction.java => CancelAllAction.java} | 4 ++-- .../sonar/server/computation/ws/CeWsModule.java | 16 ++++++++-------- ...mponentWsAction.java => ComponentAction.java} | 4 ++-- .../ws/{LogsWsAction.java => LogsAction.java} | 4 ++-- .../ws/{QueueWsAction.java => QueueAction.java} | 4 ++-- .../{SubmitWsAction.java => SubmitAction.java} | 4 ++-- .../ws/{TaskWsAction.java => TaskAction.java} | 4 ++-- .../server/ui/ws/ComponentNavigationAction.java | 4 ++-- ...WsActionTest.java => ActivityActionTest.java} | 4 ++-- ...elWsActionTest.java => CancelActionTest.java} | 4 ++-- ...sActionTest.java => CancelAllActionTest.java} | 4 ++-- .../sonar/server/computation/ws/CeWsTest.java | 2 +- ...sActionTest.java => ComponentActionTest.java} | 4 ++-- ...LogsWsActionTest.java => LogsActionTest.java} | 4 ++-- ...eueWsActionTest.java => QueueActionTest.java} | 4 ++-- ...itWsActionTest.java => SubmitActionTest.java} | 4 ++-- ...TaskWsActionTest.java => TaskActionTest.java} | 4 ++-- 19 files changed, 43 insertions(+), 43 deletions(-) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{ActivityWsAction.java => ActivityAction.java} (98%) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{CancelWsAction.java => CancelAction.java} (94%) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{CancelAllWsAction.java => CancelAllAction.java} (93%) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{ComponentWsAction.java => ComponentAction.java} (95%) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{LogsWsAction.java => LogsAction.java} (96%) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{QueueWsAction.java => QueueAction.java} (96%) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{SubmitWsAction.java => SubmitAction.java} (97%) rename server/sonar-server/src/main/java/org/sonar/server/computation/ws/{TaskWsAction.java => TaskAction.java} (95%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{ActivityWsActionTest.java => ActivityActionTest.java} (98%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{CancelWsActionTest.java => CancelActionTest.java} (95%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{CancelAllWsActionTest.java => CancelAllActionTest.java} (94%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{ComponentWsActionTest.java => ComponentActionTest.java} (97%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{LogsWsActionTest.java => LogsActionTest.java} (97%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{QueueWsActionTest.java => QueueActionTest.java} (97%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{SubmitWsActionTest.java => SubmitActionTest.java} (97%) rename server/sonar-server/src/test/java/org/sonar/server/computation/ws/{TaskWsActionTest.java => TaskActionTest.java} (98%) diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityAction.java similarity index 98% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityAction.java index 8482a3fa881..6decd092133 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ActivityAction.java @@ -51,7 +51,7 @@ import org.sonarqube.ws.WsCe; import static java.lang.String.format; import static org.sonar.server.ws.WsUtils.checkRequest; -public class ActivityWsAction implements CeWsAction { +public class ActivityAction implements CeWsAction { private static final String PARAM_COMPONENT_UUID = "componentId"; private static final String PARAM_COMPONENT_QUERY = "componentQuery"; @@ -65,7 +65,7 @@ public class ActivityWsAction implements CeWsAction { private final DbClient dbClient; private final TaskFormatter formatter; - public ActivityWsAction(UserSession userSession, DbClient dbClient, TaskFormatter formatter) { + public ActivityAction(UserSession userSession, DbClient dbClient, TaskFormatter formatter) { this.userSession = userSession; this.dbClient = dbClient; this.formatter = formatter; diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAction.java similarity index 94% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAction.java index 243bc107801..5e52a21325a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAction.java @@ -27,14 +27,14 @@ import org.sonar.core.util.Uuids; import org.sonar.server.computation.queue.CeQueue; import org.sonar.server.user.UserSession; -public class CancelWsAction implements CeWsAction { +public class CancelAction implements CeWsAction { public static final String PARAM_TASK_ID = "id"; private final UserSession userSession; private final CeQueue queue; - public CancelWsAction(UserSession userSession, CeQueue queue) { + public CancelAction(UserSession userSession, CeQueue queue) { this.userSession = userSession; this.queue = queue; } diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAllWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAllAction.java similarity index 93% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAllWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAllAction.java index 6b7e4fa8f26..d5962da455f 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAllWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CancelAllAction.java @@ -26,12 +26,12 @@ import org.sonar.api.web.UserRole; import org.sonar.server.computation.queue.CeQueue; import org.sonar.server.user.UserSession; -public class CancelAllWsAction implements CeWsAction { +public class CancelAllAction implements CeWsAction { private final UserSession userSession; private final CeQueue queue; - public CancelAllWsAction(UserSession userSession, CeQueue queue) { + public CancelAllAction(UserSession userSession, CeQueue queue) { this.userSession = userSession; this.queue = queue; } diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CeWsModule.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CeWsModule.java index adc9e28533f..09b9e10599b 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CeWsModule.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/CeWsModule.java @@ -25,16 +25,16 @@ public class CeWsModule extends Module { @Override protected void configureModule() { add( - ActivityWsAction.class, - CancelWsAction.class, - CancelAllWsAction.class, - QueueWsAction.class, + ActivityAction.class, + CancelAction.class, + CancelAllAction.class, + QueueAction.class, CeWs.class, IsQueueEmptyWs.class, - LogsWsAction.class, - ComponentWsAction.class, - SubmitWsAction.class, + LogsAction.class, + ComponentAction.class, + SubmitAction.class, TaskFormatter.class, - TaskWsAction.class); + TaskAction.class); } } diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComponentWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComponentAction.java similarity index 95% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComponentWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComponentAction.java index 9bc310675ec..07b70fd22e0 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComponentWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/ComponentAction.java @@ -36,7 +36,7 @@ import org.sonar.server.ws.WsUtils; import static org.sonarqube.ws.WsCe.ProjectResponse; -public class ComponentWsAction implements CeWsAction { +public class ComponentAction implements CeWsAction { public static final String PARAM_COMPONENT_UUID = "componentId"; @@ -44,7 +44,7 @@ public class ComponentWsAction implements CeWsAction { private final DbClient dbClient; private final TaskFormatter formatter; - public ComponentWsAction(UserSession userSession, DbClient dbClient, TaskFormatter formatter) { + public ComponentAction(UserSession userSession, DbClient dbClient, TaskFormatter formatter) { this.userSession = userSession; this.dbClient = dbClient; this.formatter = formatter; diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/LogsWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/LogsAction.java similarity index 96% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/LogsWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/LogsAction.java index 36d1c29782e..88d7ad94b10 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/LogsWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/LogsAction.java @@ -40,7 +40,7 @@ import org.sonar.server.user.UserSession; import static java.lang.String.format; -public class LogsWsAction implements CeWsAction { +public class LogsAction implements CeWsAction { public static final String ACTION = "logs"; public static final String PARAM_TASK_UUID = "taskId"; @@ -49,7 +49,7 @@ public class LogsWsAction implements CeWsAction { private final UserSession userSession; private final CeLogging ceLogging; - public LogsWsAction(DbClient dbClient, UserSession userSession, CeLogging ceLogging) { + public LogsAction(DbClient dbClient, UserSession userSession, CeLogging ceLogging) { this.dbClient = dbClient; this.userSession = userSession; this.ceLogging = ceLogging; diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/QueueWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/QueueAction.java similarity index 96% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/QueueWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/QueueAction.java index 4ee9655589a..285d5e7dc58 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/QueueWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/QueueAction.java @@ -34,7 +34,7 @@ import org.sonar.server.user.UserSession; import org.sonar.server.ws.WsUtils; import org.sonarqube.ws.WsCe; -public class QueueWsAction implements CeWsAction { +public class QueueAction implements CeWsAction { public static final String PARAM_COMPONENT_UUID = "componentId"; @@ -42,7 +42,7 @@ public class QueueWsAction implements CeWsAction { private final DbClient dbClient; private final TaskFormatter formatter; - public QueueWsAction(UserSession userSession, DbClient dbClient, TaskFormatter formatter) { + public QueueAction(UserSession userSession, DbClient dbClient, TaskFormatter formatter) { this.userSession = userSession; this.dbClient = dbClient; this.formatter = formatter; diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitAction.java similarity index 97% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitAction.java index 23de0b32722..dd7b24a2c0c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/SubmitAction.java @@ -29,7 +29,7 @@ import org.sonar.server.computation.queue.report.ReportSubmitter; import org.sonar.server.ws.WsUtils; import org.sonarqube.ws.WsCe; -public class SubmitWsAction implements CeWsAction { +public class SubmitAction implements CeWsAction { public static final String PARAM_PROJECT_KEY = "projectKey"; public static final String PARAM_PROJECT_BRANCH = "projectBranch"; @@ -38,7 +38,7 @@ public class SubmitWsAction implements CeWsAction { private final ReportSubmitter reportSubmitter; - public SubmitWsAction(ReportSubmitter reportSubmitter) { + public SubmitAction(ReportSubmitter reportSubmitter) { this.reportSubmitter = reportSubmitter; } diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskWsAction.java b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java similarity index 95% rename from server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskWsAction.java rename to server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java index 0d63ab8c0cd..e36a9a671a1 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskWsAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/computation/ws/TaskAction.java @@ -34,7 +34,7 @@ import org.sonar.server.user.UserSession; import org.sonar.server.ws.WsUtils; import org.sonarqube.ws.WsCe; -public class TaskWsAction implements CeWsAction { +public class TaskAction implements CeWsAction { public static final String ACTION = "task"; public static final String PARAM_TASK_UUID = "id"; @@ -43,7 +43,7 @@ public class TaskWsAction implements CeWsAction { private final TaskFormatter wsTaskFormatter; private final UserSession userSession; - public TaskWsAction(DbClient dbClient, TaskFormatter wsTaskFormatter, UserSession userSession) { + public TaskAction(DbClient dbClient, TaskFormatter wsTaskFormatter, UserSession userSession) { this.dbClient = dbClient; this.wsTaskFormatter = wsTaskFormatter; this.userSession = userSession; diff --git a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java index a4f7debdffa..ad69902f8d6 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ui/ws/ComponentNavigationAction.java @@ -50,7 +50,7 @@ import org.sonar.db.dashboard.DashboardDto; import org.sonar.db.property.PropertyDto; import org.sonar.db.property.PropertyQuery; import org.sonar.server.component.ComponentFinder; -import org.sonar.server.computation.ws.ActivityWsAction; +import org.sonar.server.computation.ws.ActivityAction; import org.sonar.server.ui.ViewProxy; import org.sonar.server.ui.Views; import org.sonar.server.user.UserSession; @@ -240,7 +240,7 @@ public class ComponentNavigationAction implements NavigationWsAction { json.prop("showHistory", isAdmin && componentTypeHasProperty(component, PROPERTY_MODIFIABLE_HISTORY)); json.prop("showUpdateKey", isAdmin && componentTypeHasProperty(component, PROPERTY_UPDATABLE_KEY)); json.prop("showDeletion", isAdmin && componentTypeHasProperty(component, PROPERTY_DELETABLE)); - json.prop("showBackgroundTasks", ActivityWsAction.isAllowedOnComponentUuid(userSession, component.uuid())); + json.prop("showBackgroundTasks", ActivityAction.isAllowedOnComponentUuid(userSession, component.uuid())); } private boolean componentTypeHasProperty(ComponentDto component, String resourceTypeProperty) { diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ActivityWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ActivityActionTest.java similarity index 98% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/ActivityWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/ActivityActionTest.java index c1b54d02df7..6a0d284415d 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ActivityWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ActivityActionTest.java @@ -54,7 +54,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.sonar.db.component.ComponentTesting.newProjectDto; -public class ActivityWsActionTest { +public class ActivityActionTest { @Rule public ExpectedException expectedException = ExpectedException.none(); @@ -69,7 +69,7 @@ public class ActivityWsActionTest { CeLogging ceLogging = mock(CeLogging.class); TaskFormatter formatter = new TaskFormatter(dbTester.getDbClient(), ceLogging, System2.INSTANCE); - ActivityWsAction underTest = new ActivityWsAction(userSession, dbTester.getDbClient(), formatter); + ActivityAction underTest = new ActivityAction(userSession, dbTester.getDbClient(), formatter); WsActionTester tester = new WsActionTester(underTest); @Before diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelActionTest.java similarity index 95% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelActionTest.java index 8f1cf22e2f3..07bf8290d7c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelActionTest.java @@ -33,7 +33,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; -public class CancelWsActionTest { +public class CancelActionTest { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @@ -42,7 +42,7 @@ public class CancelWsActionTest { public DbTester dbTester = DbTester.create(System2.INSTANCE); CeQueue queue = mock(CeQueue.class); - CancelWsAction underTest = new CancelWsAction(userSession, queue); + CancelAction underTest = new CancelAction(userSession, queue); WsActionTester tester = new WsActionTester(underTest); @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelAllWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelAllActionTest.java similarity index 94% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelAllWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelAllActionTest.java index 33cbe402113..84871d426c3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelAllWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CancelAllActionTest.java @@ -33,7 +33,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; -public class CancelAllWsActionTest { +public class CancelAllActionTest { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @@ -42,7 +42,7 @@ public class CancelAllWsActionTest { public DbTester dbTester = DbTester.create(System2.INSTANCE); CeQueue queue = mock(CeQueue.class); - CancelAllWsAction underTest = new CancelAllWsAction(userSession, queue); + CancelAllAction underTest = new CancelAllAction(userSession, queue); WsActionTester tester = new WsActionTester(underTest); @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CeWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CeWsTest.java index bdcd11bbf05..4c791f55536 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CeWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/CeWsTest.java @@ -31,7 +31,7 @@ public class CeWsTest { @Test public void define() throws Exception { - CeWsAction wsAction = new SubmitWsAction(mock(ReportSubmitter.class)); + CeWsAction wsAction = new SubmitAction(mock(ReportSubmitter.class)); CeWs ws = new CeWs(wsAction); WebService.Context context = mock(WebService.Context.class, Mockito.RETURNS_DEEP_STUBS); diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComponentWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComponentActionTest.java similarity index 97% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComponentWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComponentActionTest.java index 9dd41cbe196..dc3d62589c6 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComponentWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/ComponentActionTest.java @@ -44,7 +44,7 @@ import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class ComponentWsActionTest { +public class ComponentActionTest { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @@ -54,7 +54,7 @@ public class ComponentWsActionTest { CeLogging ceLogging = mock(CeLogging.class); TaskFormatter formatter = new TaskFormatter(dbTester.getDbClient(), ceLogging, System2.INSTANCE); - ComponentWsAction underTest = new ComponentWsAction(userSession, dbTester.getDbClient(), formatter); + ComponentAction underTest = new ComponentAction(userSession, dbTester.getDbClient(), formatter); WsActionTester tester = new WsActionTester(underTest); @Before diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/LogsWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/LogsActionTest.java similarity index 97% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/LogsWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/LogsActionTest.java index 44f0a0853a6..7e6c5b9b8a0 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/LogsWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/LogsActionTest.java @@ -45,7 +45,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class LogsWsActionTest { +public class LogsActionTest { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @@ -57,7 +57,7 @@ public class LogsWsActionTest { public DbTester dbTester = DbTester.create(System2.INSTANCE); CeLogging ceLogging = mock(CeLogging.class); - LogsWsAction underTest = new LogsWsAction(dbTester.getDbClient(), userSession, ceLogging); + LogsAction underTest = new LogsAction(dbTester.getDbClient(), userSession, ceLogging); WsActionTester tester = new WsActionTester(underTest); @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueActionTest.java similarity index 97% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueActionTest.java index c8baf5778b6..79c3c42c5d7 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/QueueActionTest.java @@ -44,7 +44,7 @@ import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class QueueWsActionTest { +public class QueueActionTest { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @@ -54,7 +54,7 @@ public class QueueWsActionTest { CeLogging ceLogging = mock(CeLogging.class); TaskFormatter formatter = new TaskFormatter(dbTester.getDbClient(), ceLogging, System2.INSTANCE); - QueueWsAction underTest = new QueueWsAction(userSession, dbTester.getDbClient(), formatter); + QueueAction underTest = new QueueAction(userSession, dbTester.getDbClient(), formatter); WsActionTester tester = new WsActionTester(underTest); @Before diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitActionTest.java similarity index 97% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitActionTest.java index 4a076a5f124..8032446b439 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/SubmitActionTest.java @@ -39,10 +39,10 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -public class SubmitWsActionTest { +public class SubmitActionTest { ReportSubmitter reportSubmitter = mock(ReportSubmitter.class); - SubmitWsAction underTest = new SubmitWsAction(reportSubmitter); + SubmitAction underTest = new SubmitAction(reportSubmitter); WsActionTester tester = new WsActionTester(underTest); @Test diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskWsActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskActionTest.java similarity index 98% rename from server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskWsActionTest.java rename to server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskActionTest.java index 5eca667d865..0768dd0c99f 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskWsActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/computation/ws/TaskActionTest.java @@ -48,7 +48,7 @@ import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -public class TaskWsActionTest { +public class TaskActionTest { @Rule public UserSessionRule userSession = UserSessionRule.standalone(); @@ -58,7 +58,7 @@ public class TaskWsActionTest { CeLogging ceLogging = mock(CeLogging.class); TaskFormatter formatter = new TaskFormatter(dbTester.getDbClient(), ceLogging, System2.INSTANCE); - TaskWsAction underTest = new TaskWsAction(dbTester.getDbClient(), formatter, userSession); + TaskAction underTest = new TaskAction(dbTester.getDbClient(), formatter, userSession); WsActionTester tester = new WsActionTester(underTest); @Before -- 2.39.5