aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-xoo-plugin/src/test/java/org
diff options
context:
space:
mode:
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>2022-11-30 17:06:55 +0100
committersonartech <sonartech@sonarsource.com>2022-12-01 20:03:12 +0000
commit22439884ae0616a6be566d2f2142e901cf3fe44a (patch)
tree094f0fdea9f9bb1665dee1bf5f994fb09b3a6495 /plugins/sonar-xoo-plugin/src/test/java/org
parent664bd62954836af9429055fe669d70dbd125415a (diff)
downloadsonarqube-22439884ae0616a6be566d2f2142e901cf3fe44a.tar.gz
sonarqube-22439884ae0616a6be566d2f2142e901cf3fe44a.zip
SONAR-17592 adding hotspots with multilines to xoo plugin
Diffstat (limited to 'plugins/sonar-xoo-plugin/src/test/java/org')
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/MultilineHotspotSensorTest.java32
-rw-r--r--plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java2
2 files changed, 33 insertions, 1 deletions
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/MultilineHotspotSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/MultilineHotspotSensorTest.java
new file mode 100644
index 00000000000..fd2ff0f95af
--- /dev/null
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/MultilineHotspotSensorTest.java
@@ -0,0 +1,32 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonar.xoo.rule;
+
+import org.junit.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class MultilineHotspotSensorTest {
+
+ @Test
+ public void getRuleKey_returnsTheKey() {
+ assertThat(new MultilineHotspotSensor().getRuleKey()).isEqualTo(MultilineHotspotSensor.RULE_KEY);
+ }
+} \ No newline at end of file
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java
index cb9b5d6cce8..78c861973e1 100644
--- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java
+++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/XooRulesDefinitionTest.java
@@ -119,7 +119,7 @@ public class XooRulesDefinitionTest {
assertThat(repo).isNotNull();
assertThat(repo.name()).isEqualTo("Xoo");
assertThat(repo.language()).isEqualTo("xoo");
- assertThat(repo.rules()).hasSize(25);
+ assertThat(repo.rules()).hasSize(26);
return repo;
}
}