Skip to content

Commit

Permalink
SONAR-6253 Rename some steps
Browse files Browse the repository at this point in the history
  • Loading branch information
julienlancelot committed May 13, 2015
1 parent 8775ef0 commit 3e609b5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
Expand Up @@ -44,9 +44,9 @@ public static List<Class<? extends ComputationStep>> orderedStepClasses() {
PersistNumberOfDaysSinceLastCommitStep.class, PersistNumberOfDaysSinceLastCommitStep.class,
PersistMeasuresStep.class, PersistMeasuresStep.class,
PersistIssuesStep.class, PersistIssuesStep.class,
PersistComponentLinksStep.class, PersistProjectLinksStep.class,
PersistEventsStep.class, PersistEventsStep.class,
PersistDuplicationMeasuresStep.class, PersistDuplicationsStep.class,
PersistFileSourcesStep.class, PersistFileSourcesStep.class,
PersistTestsStep.class, PersistTestsStep.class,
PersistFileDependenciesStep.class, PersistFileDependenciesStep.class,
Expand Down
Expand Up @@ -37,11 +37,14 @@


import java.util.List; import java.util.List;


public class PersistDuplicationMeasuresStep implements ComputationStep { /**
* Persist duplications into
*/
public class PersistDuplicationsStep implements ComputationStep {


private final DbClient dbClient; private final DbClient dbClient;


public PersistDuplicationMeasuresStep(DbClient dbClient) { public PersistDuplicationsStep(DbClient dbClient) {
this.dbClient = dbClient; this.dbClient = dbClient;
} }


Expand Down
Expand Up @@ -43,7 +43,10 @@


import static com.google.common.collect.Sets.newHashSet; import static com.google.common.collect.Sets.newHashSet;


public class PersistComponentLinksStep implements ComputationStep { /**
* Persist project and module links
*/
public class PersistProjectLinksStep implements ComputationStep {


private final DbClient dbClient; private final DbClient dbClient;
private final I18n i18n; private final I18n i18n;
Expand All @@ -56,7 +59,7 @@ public class PersistComponentLinksStep implements ComputationStep {
Constants.ComponentLinkType.ISSUE, ComponentLinkDto.TYPE_ISSUE_TRACKER Constants.ComponentLinkType.ISSUE, ComponentLinkDto.TYPE_ISSUE_TRACKER
); );


public PersistComponentLinksStep(DbClient dbClient, I18n i18n) { public PersistProjectLinksStep(DbClient dbClient, I18n i18n) {
this.dbClient = dbClient; this.dbClient = dbClient;
this.i18n = i18n; this.i18n = i18n;
} }
Expand Down
Expand Up @@ -43,10 +43,10 @@ public void ordered_steps() {
mock(PurgeDatastoresStep.class), mock(PurgeDatastoresStep.class),
mock(SendIssueNotificationsStep.class), mock(SendIssueNotificationsStep.class),
mock(IndexComponentsStep.class), mock(IndexComponentsStep.class),
mock(PersistComponentLinksStep.class), mock(PersistProjectLinksStep.class),
mock(PersistMeasuresStep.class), mock(PersistMeasuresStep.class),
mock(PersistEventsStep.class), mock(PersistEventsStep.class),
mock(PersistDuplicationMeasuresStep.class), mock(PersistDuplicationsStep.class),
mock(PersistNumberOfDaysSinceLastCommitStep.class), mock(PersistNumberOfDaysSinceLastCommitStep.class),
mock(PersistFileSourcesStep.class), mock(PersistFileSourcesStep.class),
mock(PersistFileDependenciesStep.class), mock(PersistFileDependenciesStep.class),
Expand Down
Expand Up @@ -20,7 +20,11 @@


package org.sonar.server.computation.step; package org.sonar.server.computation.step;


import org.junit.*; import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category; import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder; import org.junit.rules.TemporaryFolder;
import org.sonar.api.i18n.I18n; import org.sonar.api.i18n.I18n;
Expand Down Expand Up @@ -59,7 +63,7 @@ public class PersistComponentLinksStepTest extends BaseStepTest {


I18n i18n; I18n i18n;


PersistComponentLinksStep step; PersistProjectLinksStep step;


@Before @Before
public void setup() { public void setup() {
Expand All @@ -74,7 +78,7 @@ public void setup() {
when(i18n.message(Locale.ENGLISH, "project_links.ci", null)).thenReturn("Continuous integration"); when(i18n.message(Locale.ENGLISH, "project_links.ci", null)).thenReturn("Continuous integration");
when(i18n.message(Locale.ENGLISH, "project_links.issue", null)).thenReturn("Issues"); when(i18n.message(Locale.ENGLISH, "project_links.issue", null)).thenReturn("Issues");


step = new PersistComponentLinksStep(dbClient, i18n); step = new PersistProjectLinksStep(dbClient, i18n);
} }


@Override @Override
Expand Down
Expand Up @@ -20,7 +20,11 @@


package org.sonar.server.computation.step; package org.sonar.server.computation.step;


import org.junit.*; import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category; import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder; import org.junit.rules.TemporaryFolder;
import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.CoreMetrics;
Expand Down Expand Up @@ -61,7 +65,7 @@


DbClient dbClient; DbClient dbClient;


PersistDuplicationMeasuresStep sut; PersistDuplicationsStep sut;


@Before @Before
public void setup() throws Exception { public void setup() throws Exception {
Expand All @@ -71,7 +75,7 @@ public void setup() throws Exception {


reportDir = temp.newFolder(); reportDir = temp.newFolder();


sut = new PersistDuplicationMeasuresStep(dbClient); sut = new PersistDuplicationsStep(dbClient);
} }


@Override @Override
Expand Down

0 comments on commit 3e609b5

Please sign in to comment.