aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-pmd-plugin/pmd-result.xml3
-rw-r--r--plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java2
-rw-r--r--plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java5
-rw-r--r--plugins/sonar-pmd-plugin/toto.txt10
4 files changed, 4 insertions, 16 deletions
diff --git a/plugins/sonar-pmd-plugin/pmd-result.xml b/plugins/sonar-pmd-plugin/pmd-result.xml
deleted file mode 100644
index b95ea127b30..00000000000
--- a/plugins/sonar-pmd-plugin/pmd-result.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<pmd version="4.2.5" timestamp="2010-09-15T23:57:48.955">
-</pmd> \ No newline at end of file
diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java
index 64343d7d97f..eabaddb6abb 100644
--- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java
+++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdExecutorTest.java
@@ -50,6 +50,7 @@ public class PmdExecutorTest {
File root = new File(getClass().getResource("/org/sonar/plugins/pmd/PmdExecutorTest/executeOnManySourceDirs/").toURI());
when(fs.getSourceFiles(Java.INSTANCE)).thenReturn(Arrays.asList(new File(root, "src1/FirstClass.java"), new File(root, "src2/SecondClass.java")));
when(fs.getSourceCharset()).thenReturn(Charset.forName("UTF-8"));
+ when(fs.getSonarWorkingDirectory()).thenReturn(new File("target"));
project.setFileSystem(fs);
PmdConfiguration conf = mock(PmdConfiguration.class);
@@ -74,6 +75,7 @@ public class PmdExecutorTest {
ProjectFileSystem fs = mock(ProjectFileSystem.class);
when(fs.getSourceFiles(Java.INSTANCE)).thenReturn(Arrays.asList(new File("test-resources/ignorePmdFailures/DoesNotCompile.java")));
when(fs.getSourceCharset()).thenReturn(Charset.forName("UTF-8"));
+ when(fs.getSonarWorkingDirectory()).thenReturn(new File("target"));
project.setFileSystem(fs);
PmdConfiguration conf = mock(PmdConfiguration.class);
diff --git a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java
index 594c4cbc75f..d6189e13196 100644
--- a/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java
+++ b/plugins/sonar-pmd-plugin/src/test/java/org/sonar/plugins/pmd/PmdProfileExporterTest.java
@@ -27,8 +27,6 @@ import org.sonar.plugins.pmd.xml.PmdRule;
import org.sonar.test.TestUtils;
import org.xml.sax.SAXException;
-import com.thoughtworks.xstream.io.xml.JDomReader;
-
public class PmdProfileExporterTest {
private PmdProfileExporter exporter = new PmdProfileExporter();
@@ -61,7 +59,8 @@ public class PmdProfileExporterTest {
xpath.setParameter(PmdConstants.XPATH_EXPRESSION_PARAM, "//FieldDeclaration");
xpath.setParameter(PmdConstants.XPATH_MESSAGE_PARAM, "This is bad");
exporter.exportProfile(profile, xmlOutput);
- assertEquals(TestUtils.getResourceContent("/org/sonar/plugins/pmd/export_xpath_rules.xml"), StringUtils.remove(xmlOutput.toString(), '\r'));
+ assertEquals(TestUtils.getResourceContent("/org/sonar/plugins/pmd/export_xpath_rules.xml"),
+ StringUtils.remove(xmlOutput.toString(), '\r'));
}
@Test
diff --git a/plugins/sonar-pmd-plugin/toto.txt b/plugins/sonar-pmd-plugin/toto.txt
deleted file mode 100644
index 08cd17216b9..00000000000
--- a/plugins/sonar-pmd-plugin/toto.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resultset>
- <rule class="net.sourceforge.pmd.rules.XPathRule" message="This is bad" name="MyOwnRule">
- <priority>3</priority>
- <properties>
- <property name="xpath" value="//FieldDeclaration" />
- </properties>
- </rule>
-</resultset>
-