summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2015-02-09 17:17:00 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2015-02-09 17:51:19 +0100
commita2fa3e4651b30a3cb9284a34656ed8ecfc13d274 (patch)
tree3625b03443dccc3d3ae39f83b9d28b4bef6688c8 /sonar-plugin-api/src/test
parentb49f4a0e2dc098099f2172e24a48768a983f96f5 (diff)
downloadsonarqube-a2fa3e4651b30a3cb9284a34656ed8ecfc13d274.tar.gz
sonarqube-a2fa3e4651b30a3cb9284a34656ed8ecfc13d274.zip
SONAR-6162 Fix NPE when searching for Check of custom rules
Diffstat (limited to 'sonar-plugin-api/src/test')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java
index 42f8d7f6654..d802900f71b 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/rule/CheckFactoryTest.java
@@ -114,9 +114,9 @@ public class CheckFactoryTest {
}
@Test
- public void use_engine_key() {
- RuleKey ruleKey = RuleKey.of("squid", "One");
- builder.create(ruleKey).setInternalKey("S0001").activate();
+ public void use_template_rule_key() {
+ RuleKey ruleKey = RuleKey.of("squid", "S0001_123");
+ builder.create(ruleKey).setTemplateRuleKey("S0001").activate();
CheckFactory checkFactory = new CheckFactory(builder.build());
Checks checks = checkFactory.create("squid").addAnnotatedChecks(CheckWithKey.class);