diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-05-20 17:36:55 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-05-20 21:22:56 +0200 |
commit | 6af08cecc609d8cfd7e59338398a37cc954828b7 (patch) | |
tree | ef3ff1cba93c8e4d84e866897c66981d248fcd39 /sonar-core | |
parent | 4c3a69653fcc9293f62f7382d51303e2e7f55338 (diff) | |
download | sonarqube-6af08cecc609d8cfd7e59338398a37cc954828b7.tar.gz sonarqube-6af08cecc609d8cfd7e59338398a37cc954828b7.zip |
SONAR-5007 improve conversion fk of ES doc to WS response
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java index 8b0c63095db..1cafd982568 100644 --- a/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java +++ b/sonar-core/src/test/java/org/sonar/core/rule/RuleDaoTest.java @@ -29,6 +29,7 @@ import org.junit.Test; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; import org.sonar.api.rules.Rule; +import org.sonar.api.server.debt.DebtRemediationFunction; import org.sonar.api.utils.DateUtils; import org.sonar.check.Cardinality; import org.sonar.core.persistence.AbstractDaoTestCase; @@ -187,8 +188,8 @@ public class RuleDaoTest extends AbstractDaoTestCase { .setNoteUpdatedAt(DateUtils.parseDate("2013-12-20")) .setSubCharacteristicId(100) .setDefaultSubCharacteristicId(101) - .setRemediationFunction("linear") - .setDefaultRemediationFunction("linear_offset") + .setRemediationFunction(DebtRemediationFunction.Type.LINEAR.toString()) + .setDefaultRemediationFunction(DebtRemediationFunction.Type.LINEAR_OFFSET.toString()) .setRemediationCoefficient("1h") .setDefaultRemediationCoefficient("5d") .setRemediationOffset("5min") @@ -220,8 +221,8 @@ public class RuleDaoTest extends AbstractDaoTestCase { .setParentId(3) .setSubCharacteristicId(100) .setDefaultSubCharacteristicId(101) - .setRemediationFunction("linear") - .setDefaultRemediationFunction("linear_offset") + .setRemediationFunction(DebtRemediationFunction.Type.LINEAR.toString()) + .setDefaultRemediationFunction(DebtRemediationFunction.Type.LINEAR_OFFSET.toString()) .setRemediationCoefficient("1h") .setDefaultRemediationCoefficient("5d") .setRemediationOffset("5min") @@ -253,8 +254,8 @@ public class RuleDaoTest extends AbstractDaoTestCase { .setParentId(3) .setSubCharacteristicId(100) .setDefaultSubCharacteristicId(101) - .setRemediationFunction("linear") - .setDefaultRemediationFunction("linear_offset") + .setRemediationFunction(DebtRemediationFunction.Type.LINEAR.toString()) + .setDefaultRemediationFunction(DebtRemediationFunction.Type.LINEAR_OFFSET.toString()) .setRemediationCoefficient("1h") .setDefaultRemediationCoefficient("5d") .setRemediationOffset("5min") @@ -275,8 +276,8 @@ public class RuleDaoTest extends AbstractDaoTestCase { .setParentId(null) .setSubCharacteristicId(102) .setDefaultSubCharacteristicId(103) - .setRemediationFunction("linear_offset") - .setDefaultRemediationFunction("linear") + .setRemediationFunction(DebtRemediationFunction.Type.LINEAR_OFFSET.toString()) + .setDefaultRemediationFunction(DebtRemediationFunction.Type.LINEAR.toString()) .setRemediationCoefficient("5d") .setDefaultRemediationCoefficient("1h") .setRemediationOffset("10h") |