aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-10 16:02:43 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-07-10 16:02:43 +0200
commite1f4102e815edcf784fba3387613079cfed76559 (patch)
tree265e43ed004311d6be58b271ffa94de0450116b9 /sonar-batch
parente9bbd1e5723097b90c90fab10f0f4aa6818dd9bb (diff)
downloadsonarqube-e1f4102e815edcf784fba3387613079cfed76559.tar.gz
sonarqube-e1f4102e815edcf784fba3387613079cfed76559.zip
SONAR-5388 Method renaming
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java8
3 files changed, 6 insertions, 6 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java
index 84f0267b599..d94fc38f5c5 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingDecorator.java
@@ -106,7 +106,7 @@ public final class SqaleRatingDecorator implements Decorator {
InputFile file = fs.inputFile(fs.predicates().hasRelativePath(context.getResource().getKey()));
if (file != null) {
String language = file.language();
- return getMeasureValue(context, sqaleRatingSettings.getSizeMetric(language, metrics)) * sqaleRatingSettings.getWorkUnitsBySizePoint(language);
+ return getMeasureValue(context, sqaleRatingSettings.getSizeMetric(language, metrics)) * sqaleRatingSettings.getDevCost(language);
} else {
Collection<Measure> childrenMeasures = context.getChildrenMeasures(CoreMetrics.DEVELOPMENT_COST);
Double sum = sum(childrenMeasures);
diff --git a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java
index 47596373f11..455257aab8d 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/debt/SqaleRatingSettings.java
@@ -48,7 +48,7 @@ public class SqaleRatingSettings implements BatchComponent {
}
}
- public long getWorkUnitsBySizePoint(String languageKey) {
+ public long getDevCost(String languageKey) {
try {
LanguageSpecificConfiguration languageSpecificConfig = getSpecificParametersForLanguage(languageKey);
if (languageSpecificConfig != null && languageSpecificConfig.getManDays() != null) {
diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java
index 8ab9e5c5f66..c661150bb97 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingSettingsTest.java
@@ -64,7 +64,7 @@ public class SqaleRatingSettingsTest {
settings.setProperty(CoreProperties.DEVELOPMENT_COST, "50");
SqaleRatingSettings configurationLoader = new SqaleRatingSettings(settings);
- assertThat(configurationLoader.getWorkUnitsBySizePoint("defaultLanguage")).isEqualTo(50L);
+ assertThat(configurationLoader.getDevCost("defaultLanguage")).isEqualTo(50L);
}
@Test
@@ -93,8 +93,8 @@ public class SqaleRatingSettingsTest {
assertThat(configurationLoader.getSizeMetric(aLanguage, metrics)).isEqualTo(CoreMetrics.NCLOC);
assertThat(configurationLoader.getSizeMetric(anotherLanguage, metrics)).isEqualTo(CoreMetrics.COMPLEXITY);
- assertThat(configurationLoader.getWorkUnitsBySizePoint(aLanguage)).isEqualTo(30L);
- assertThat(configurationLoader.getWorkUnitsBySizePoint(anotherLanguage)).isEqualTo(40L);
+ assertThat(configurationLoader.getDevCost(aLanguage)).isEqualTo(30L);
+ assertThat(configurationLoader.getDevCost(anotherLanguage)).isEqualTo(40L);
}
@Test
@@ -138,6 +138,6 @@ public class SqaleRatingSettingsTest {
SqaleRatingSettings configurationLoader = new SqaleRatingSettings(settings);
assertThat(configurationLoader.getSizeMetric(aLanguage, metrics)).isEqualTo(CoreMetrics.COMPLEXITY);
- assertThat(configurationLoader.getWorkUnitsBySizePoint(aLanguage)).isEqualTo(40L);
+ assertThat(configurationLoader.getDevCost(aLanguage)).isEqualTo(40L);
}
}