diff options
author | fmallet <freddy.mallet@gmail.com> | 2010-09-17 12:20:29 +0000 |
---|---|---|
committer | fmallet <freddy.mallet@gmail.com> | 2010-09-17 12:20:29 +0000 |
commit | 483e55684694fde66f26e82ba21c3d042feefbbd (patch) | |
tree | 27ef0e1de6ca4dba55eef4b0a4fdddd201e4c07c | |
parent | 7215f16b54854286de9e01390efa533a104259e1 (diff) | |
download | sonarqube-483e55684694fde66f26e82ba21c3d042feefbbd.tar.gz sonarqube-483e55684694fde66f26e82ba21c3d042feefbbd.zip |
fix integration test : the root node of a PMD configuration is "ruleset" and not "resultset"
4 files changed, 6 insertions, 6 deletions
diff --git a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java index db8d56ba93d..87d9d1f5c3c 100644 --- a/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java +++ b/plugins/sonar-pmd-plugin/src/main/java/org/sonar/plugins/pmd/PmdProfileExporter.java @@ -94,7 +94,7 @@ public class PmdProfileExporter extends ProfileExporter { } protected String exportPmdRulesetToXml(PmdRuleset pmdRuleset) { - Element eltRuleset = new Element("resultset"); + Element eltRuleset = new Element("ruleset"); for (PmdRule pmdRule : pmdRuleset.getPmdRules()) { Element eltRule = new Element("rule"); addAttribute(eltRule, "ref", pmdRule.getRef()); diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java index a54c00f7f78..2fc6936cfb8 100644 --- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java +++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdConfigurationTest.java @@ -45,7 +45,7 @@ public class PmdConfigurationTest { assertThat(rulesets.size(), is(1)); File xmlFile = new File(rulesets.get(0)); assertThat(xmlFile.exists(), is(true)); - assertThat(FileUtils.readFileToString(xmlFile), is("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<resultset />\r\n\r\n")); + assertThat(FileUtils.readFileToString(xmlFile), is("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<ruleset />\r\n\r\n")); } @Test diff --git a/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_simple.xml b/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_simple.xml index aeb69c7f6a4..4bf950da263 100644 --- a/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_simple.xml +++ b/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_simple.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<resultset> +<ruleset> <rule ref="rulesets/coupling.xml/CouplingBetweenObjects"> <priority>2</priority> <properties> @@ -12,5 +12,5 @@ <rule ref="rulesets/design.xml/UseNotifyAllInsteadOfNotify"> <priority>4</priority> </rule> -</resultset> +</ruleset> diff --git a/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_xpath_rules.xml b/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_xpath_rules.xml index 1031a6bf008..049f9f4558d 100644 --- a/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_xpath_rules.xml +++ b/plugins/sonar-pmd-plugin/src/test/resources/org/sonar/plugins/pmd/export_xpath_rules.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<resultset> +<ruleset> <rule class="net.sourceforge.pmd.rules.XPathRule" message="This is bad" name="MyOwnRule"> <priority>3</priority> <properties> @@ -8,5 +8,5 @@ </property> </properties> </rule> -</resultset> +</ruleset> |