IndexIssuesStep.class,
IndexSourceLinesStep.class,
IndexTestsStep.class,
- IndexViewsStep.class,
// notifications are sent at the end, so that webapp displays up-to-date information
SendIssueNotificationsStep.class);
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.sonar.server.computation.step;
-
-import org.sonar.server.computation.ComputationContext;
-import org.sonar.server.view.index.ViewIndexer;
-
-public class IndexViewsStep implements ComputationStep {
-
- private final ViewIndexer indexer;
-
- public IndexViewsStep(ViewIndexer indexer) {
- this.indexer = indexer;
- }
-
- @Override
- public void execute(ComputationContext context) {
- indexer.index(context.getProject().uuid());
- }
-
- @Override
- public String getDescription() {
- return "Index views";
- }
-}
mock(ApplyPermissionsStep.class),
mock(ParseReportStep.class),
mock(IndexSourceLinesStep.class),
- mock(IndexViewsStep.class),
mock(PersistIssuesStep.class),
mock(IndexIssuesStep.class),
mock(SwitchSnapshotStep.class),
mock(IndexTestsStep.class)
);
- assertThat(registry.orderedSteps()).hasSize(18);
+ assertThat(registry.orderedSteps()).hasSize(17);
assertThat(registry.orderedSteps().get(0)).isInstanceOf(ParseReportStep.class);
- assertThat(registry.orderedSteps().get(17)).isInstanceOf(SendIssueNotificationsStep.class);
+ assertThat(registry.orderedSteps().get(16)).isInstanceOf(SendIssueNotificationsStep.class);
}
@Test
+++ /dev/null
-/*
- * SonarQube, open source software quality management tool.
- * Copyright (C) 2008-2014 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * SonarQube is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * SonarQube is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.sonar.server.computation.step;
-
-import org.junit.Test;
-import org.sonar.api.resources.Qualifiers;
-import org.sonar.server.component.ComponentTesting;
-import org.sonar.server.computation.ComputationContext;
-import org.sonar.server.view.index.ViewIndexer;
-
-import static org.mockito.Mockito.*;
-
-public class IndexViewsStepTest extends BaseStepTest {
-
- ComputationContext context = mock(ComputationContext.class);
- ViewIndexer indexer = mock(ViewIndexer.class);
- IndexViewsStep sut = new IndexViewsStep(indexer);
-
- @Test
- public void index_views() {
- when(context.getProject()).thenReturn(ComponentTesting.newProjectDto("ABCD").setQualifier(Qualifiers.VIEW));
-
- sut.execute(context);
-
- verify(indexer).index("ABCD");
- }
-
- @Override
- protected ComputationStep step() {
- return sut;
- }
-}