aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-testing-harness/src/main/java
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-10-05 10:09:39 +0200
committerDavid Gageot <david@gageot.net>2012-10-05 10:09:39 +0200
commit1bd03f2eebdfa1b56c1ce410081223b2b646754f (patch)
tree7402e98f1c61ef6466e0a6d6ad407f740d8ac06e /sonar-testing-harness/src/main/java
parent8e94477d8a7e41f5835e9554f71d007453461339 (diff)
downloadsonarqube-1bd03f2eebdfa1b56c1ce410081223b2b646754f.tar.gz
sonarqube-1bd03f2eebdfa1b56c1ce410081223b2b646754f.zip
SONAR-3724 Validate rule repositories in unit tests
Diffstat (limited to 'sonar-testing-harness/src/main/java')
-rw-r--r--sonar-testing-harness/src/main/java/org/sonar/test/i18n/RuleRepositoryTestHelper.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/RuleRepositoryTestHelper.java b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/RuleRepositoryTestHelper.java
index 79e763dd1ae..8315eb27282 100644
--- a/sonar-testing-harness/src/main/java/org/sonar/test/i18n/RuleRepositoryTestHelper.java
+++ b/sonar-testing-harness/src/main/java/org/sonar/test/i18n/RuleRepositoryTestHelper.java
@@ -35,13 +35,13 @@ public final class RuleRepositoryTestHelper {
// Static utility class
}
- public static List<Rule> createRulesWithNameAndDescription(String plugin, RuleRepository repository) {
- Properties props = loadProperties(String.format("/org/sonar/l10n/%s.properties", plugin));
+ public static List<Rule> createRulesWithNameAndDescription(String pluginKey, RuleRepository repository) {
+ Properties props = loadProperties(String.format("/org/sonar/l10n/%s.properties", pluginKey));
List<Rule> rules = repository.createRules();
for (Rule rule : rules) {
String name = props.getProperty(String.format("rule.%s.%s.name", repository.getKey(), rule.getKey()));
- String description = TestUtils.getResourceContent(String.format("/org/sonar/l10n/%s/rules/%s/%s.html", plugin, repository.getKey(), rule.getKey()));
+ String description = TestUtils.getResourceContent(String.format("/org/sonar/l10n/%s/rules/%s/%s.html", pluginKey, repository.getKey(), rule.getKey()));
rule.setName(name);
rule.setDescription(description);