diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-07-10 13:54:10 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-07-10 13:54:15 +0200 |
commit | f09ad0c18ab1e326722e0fb224c05dc62b0e7c0e (patch) | |
tree | 0087b94c57d9b7342f647dc6ad5593f999b4e5f7 /sonar-batch/src | |
parent | 35484095549ad707c4815b59aae1c7e7a3f52e20 (diff) | |
download | sonarqube-f09ad0c18ab1e326722e0fb224c05dc62b0e7c0e.tar.gz sonarqube-f09ad0c18ab1e326722e0fb224c05dc62b0e7c0e.zip |
SONAR-5388 Rename properties
Diffstat (limited to 'sonar-batch/src')
3 files changed, 9 insertions, 9 deletions
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 acba0266e26..47596373f11 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 @@ -54,10 +54,10 @@ public class SqaleRatingSettings implements BatchComponent { if (languageSpecificConfig != null && languageSpecificConfig.getManDays() != null) { return Long.parseLong(languageSpecificConfig.getManDays()); } - return Long.parseLong(settings.getString(CoreProperties.MAN_DAYS_BY_SIZE_POINT)); + return Long.parseLong(settings.getString(CoreProperties.DEVELOPMENT_COST)); } catch (Exception e) { - throw new IllegalArgumentException("The value of the SQALE property '" + CoreProperties.MAN_DAYS_BY_SIZE_POINT - + "' is incorrect. Expected long but got '" + settings.getString(CoreProperties.MAN_DAYS_BY_SIZE_POINT) + "'", e); + throw new IllegalArgumentException("The value of the SQALE property '" + CoreProperties.DEVELOPMENT_COST + + "' is incorrect. Expected long but got '" + settings.getString(CoreProperties.DEVELOPMENT_COST) + "'", e); } } diff --git a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java index 1fe1574bffe..cd3029f6e51 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/debt/SqaleRatingDecoratorTest.java @@ -110,7 +110,7 @@ public class SqaleRatingDecoratorTest { @Test public void save_total_rating_c() { - settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, 2 * ONE_DAY_IN_MINUTES); + settings.setProperty(CoreProperties.DEVELOPMENT_COST, 2 * ONE_DAY_IN_MINUTES); settings.setProperty(CoreProperties.SIZE_METRIC, "ncloc"); settings.setProperty(CoreProperties.RATING_GRID, "1, 10,20,50"); @@ -127,7 +127,7 @@ public class SqaleRatingDecoratorTest { @Test public void save_total_rating_a() { - settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, 2 * ONE_DAY_IN_MINUTES); + settings.setProperty(CoreProperties.DEVELOPMENT_COST, 2 * ONE_DAY_IN_MINUTES); settings.setProperty(CoreProperties.SIZE_METRIC, "ncloc"); settings.setProperty(CoreProperties.RATING_GRID, "1, 10,20,50"); @@ -144,7 +144,7 @@ public class SqaleRatingDecoratorTest { @Test public void save_total_rating_e() { - settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, 2 * ONE_DAY_IN_MINUTES); + settings.setProperty(CoreProperties.DEVELOPMENT_COST, 2 * ONE_DAY_IN_MINUTES); settings.setProperty(CoreProperties.SIZE_METRIC, "ncloc"); settings.setProperty(CoreProperties.RATING_GRID, "1, 10,20,50"); 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 cd784f135fc..8ab9e5c5f66 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 @@ -61,7 +61,7 @@ public class SqaleRatingSettingsTest { @Test public void load_work_units_for_language() throws Exception { - settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, "50"); + settings.setProperty(CoreProperties.DEVELOPMENT_COST, "50"); SqaleRatingSettings configurationLoader = new SqaleRatingSettings(settings); assertThat(configurationLoader.getWorkUnitsBySizePoint("defaultLanguage")).isEqualTo(50L); @@ -110,7 +110,7 @@ public class SqaleRatingSettingsTest { @Test public void fail_on_invalid_work_unit_value() throws Exception { throwable.expect(IllegalArgumentException.class); - settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, "a"); + settings.setProperty(CoreProperties.DEVELOPMENT_COST, "a"); SqaleRatingSettings configurationLoader = new SqaleRatingSettings(settings); configurationLoader.getSizeMetric("aLanguage", metrics); @@ -130,7 +130,7 @@ public class SqaleRatingSettingsTest { String aLanguage = "aLanguage"; settings.setProperty(CoreProperties.SIZE_METRIC, "complexity"); - settings.setProperty(CoreProperties.MAN_DAYS_BY_SIZE_POINT, "30"); + settings.setProperty(CoreProperties.DEVELOPMENT_COST, "30"); settings.setProperty(CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS, "0"); settings.setProperty(CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS + "." + "0" + "." + CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS_LANGUAGE_KEY, aLanguage); settings.setProperty(CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS + "." + "0" + "." + CoreProperties.LANGUAGE_SPECIFIC_PARAMETERS_MAN_DAYS_KEY, "40"); |