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);
}
}
@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");
@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");
@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");
@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);
@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);
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");
.deprecatedKey("sizeMetric")
.build(),
- PropertyDefinition.builder(CoreProperties.MAN_DAYS_BY_SIZE_POINT)
- .defaultValue("" + CoreProperties.MAN_DAYS_BY_SIZE_POINT_DEF_VALUE)
+ PropertyDefinition.builder(CoreProperties.DEVELOPMENT_COST)
+ .defaultValue("" + CoreProperties.DEVELOPMENT_COST_DEF_VALUE)
.name("Development cost")
.description("Cost to develop one unit of code. If the unit is a line of code (LOC), and the cost to develop 1 LOC has been estimated at 30 minutes, " +
"then the value of this property would be 30.")
/**
* @since 4.5
*/
- String MAN_DAYS_BY_SIZE_POINT = "sonar.technicalDebt.workUnitsBySizePoint";
+ String DEVELOPMENT_COST = "sonar.technicalDebt.developmentCost";
/**
* @since 4.5
*/
- String MAN_DAYS_BY_SIZE_POINT_DEF_VALUE = "30";
+ String DEVELOPMENT_COST_DEF_VALUE = "30";
/**
* @since 4.5