aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api-impl/src/test
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2023-04-26 10:59:09 -0500
committersonartech <sonartech@sonarsource.com>2023-04-28 20:02:57 +0000
commitdb1a20f20ebcee549d47d0eb59b3b8882f58efef (patch)
tree6cdd75eaa9760dd5747f459cd44e5ebf7c5c8230 /sonar-plugin-api-impl/src/test
parenta8b0bf6f8eafc033ce0a1f97609a25f23a95b0bc (diff)
downloadsonarqube-db1a20f20ebcee549d47d0eb59b3b8882f58efef.tar.gz
sonarqube-db1a20f20ebcee549d47d0eb59b3b8882f58efef.zip
Revert "SONAR-19050 Upgrade sonar-plugin-api to v9.16.0.549"
This reverts commit 27f1179c0cb7e4add8cb8c9f49d5864da4681c66.
Diffstat (limited to 'sonar-plugin-api-impl/src/test')
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java7
-rw-r--r--sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java6
2 files changed, 7 insertions, 6 deletions
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
index bb3dfba0f20..46a9b8e8e46 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/issue/internal/DefaultExternalIssueTest.java
@@ -30,8 +30,8 @@ import org.sonar.api.batch.fs.internal.DefaultInputProject;
import org.sonar.api.batch.fs.internal.TestInputFileBuilder;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
-import org.sonar.api.code.CodeCharacteristic;
import org.sonar.api.rule.RuleKey;
+import org.sonar.api.rules.RuleCharacteristic;
import org.sonar.api.rules.RuleType;
import static org.assertj.core.api.Assertions.assertThat;
@@ -54,6 +54,7 @@ public class DefaultExternalIssueTest {
.setWorkDir(temp.newFolder()));
}
+
private DefaultInputFile inputFile = new TestInputFileBuilder("foo", "src/Foo.php")
.initMetadata("Foo\nBar\n")
.build();
@@ -70,7 +71,7 @@ public class DefaultExternalIssueTest {
.remediationEffortMinutes(10L)
.type(RuleType.BUG)
.severity(Severity.BLOCKER)
- .characteristic(CodeCharacteristic.SECURE);
+ .characteristic(RuleCharacteristic.SECURE);
assertThat(issue.primaryLocation().inputComponent()).isEqualTo(inputFile);
assertThat(issue.ruleKey()).isEqualTo(RuleKey.of("external_repo", "rule"));
@@ -80,7 +81,7 @@ public class DefaultExternalIssueTest {
assertThat(issue.remediationEffort()).isEqualTo(10L);
assertThat(issue.type()).isEqualTo(RuleType.BUG);
assertThat(issue.severity()).isEqualTo(Severity.BLOCKER);
- assertThat(issue.characteristic()).isEqualTo(CodeCharacteristic.SECURE);
+ assertThat(issue.characteristic()).isEqualTo(RuleCharacteristic.SECURE);
assertThat(issue.primaryLocation().message()).isEqualTo("Wrong way!");
issue.save();
diff --git a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
index 1a0807032b1..6ba0c8dde7b 100644
--- a/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
+++ b/sonar-plugin-api-impl/src/test/java/org/sonar/api/batch/sensor/rule/internal/DefaultAdHocRuleTest.java
@@ -23,7 +23,7 @@ import org.junit.Test;
import org.sonar.api.batch.rule.Severity;
import org.sonar.api.batch.sensor.internal.SensorStorage;
import org.sonar.api.batch.sensor.rule.NewAdHocRule;
-import org.sonar.api.code.CodeCharacteristic;
+import org.sonar.api.rules.RuleCharacteristic;
import org.sonar.api.rules.RuleType;
import static org.assertj.core.api.Assertions.assertThat;
@@ -44,7 +44,7 @@ public class DefaultAdHocRuleTest {
.description("desc")
.severity(Severity.BLOCKER)
.type(RuleType.CODE_SMELL)
- .characteristic(CodeCharacteristic.COMPLIANT);
+ .characteristic(RuleCharacteristic.COMPLIANT);
rule.save();
assertThat(rule.engineId()).isEqualTo("engine");
@@ -53,7 +53,7 @@ public class DefaultAdHocRuleTest {
assertThat(rule.description()).isEqualTo("desc");
assertThat(rule.severity()).isEqualTo(Severity.BLOCKER);
assertThat(rule.type()).isEqualTo(RuleType.CODE_SMELL);
- assertThat(rule.characteristic()).isEqualTo(CodeCharacteristic.COMPLIANT);
+ assertThat(rule.characteristic()).isEqualTo(RuleCharacteristic.COMPLIANT);
verify(storage).store(any(DefaultAdHocRule.class));
}