aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-02-19 10:32:42 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2013-02-19 10:32:42 +0100
commit335292b0f9a0a644a225bee0e8b39eab672c1ce8 (patch)
tree558cc253a42297645db83ddb8923f0ca45a1e248 /plugins
parente7aabcfba880d8c4f03feb2d4e10934e304a257e (diff)
downloadsonarqube-335292b0f9a0a644a225bee0e8b39eab672c1ce8.tar.gz
sonarqube-335292b0f9a0a644a225bee0e8b39eab672c1ce8.zip
Simplify testability of PathResolver.RelativePath
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java
index fbb7a0b7d32..7131fda4e3c 100644
--- a/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java
+++ b/plugins/sonar-cpd-plugin/src/test/java/org/sonar/plugins/cpd/SonarEngineTest.java
@@ -63,9 +63,8 @@ public class SonarEngineTest {
public void testGetResource() {
PathResolver pathResolver = mock(PathResolver.class);
ModuleFileSystem fileSystem = mock(ModuleFileSystem.class);
- RelativePath relativePath = mock(RelativePath.class);
+ RelativePath relativePath = new RelativePath(null, "com/foo/Bar.java");
when(pathResolver.relativePath(anyCollection(), any(java.io.File.class))).thenReturn(relativePath);
- when(relativePath.path()).thenReturn("com/foo/Bar.java");
SonarEngine engine = new SonarEngine(null, fileSystem, pathResolver, null);
Resource<?> resource = engine.getResource(new java.io.File(""));