]> source.dussan.org Git - sonarqube.git/commitdiff
Fix test on Windows
authorJulien HENRY <julien.henry@sonarsource.com>
Tue, 10 Feb 2015 16:39:50 +0000 (17:39 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 10 Feb 2015 16:39:50 +0000 (17:39 +0100)
sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java
sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DeprecatedDefaultInputFileTest.java

index 36201064c61ab35aae43d2ebb88b72ff60b2ee8d..edf072dca79404c5bfbaab88ab1bf004fcab6804 100644 (file)
@@ -25,7 +25,6 @@ import org.junit.rules.TemporaryFolder;
 import org.sonar.api.batch.fs.InputFile;
 
 import java.io.File;
-import java.nio.file.Paths;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -71,7 +70,7 @@ public class DefaultInputFileTest {
 
   @Test
   public void test_toString() throws Exception {
-    DefaultInputFile file = new DefaultInputFile("ABCDE", "src/Foo.php").setModuleBaseDir(Paths.get("/path/to/"));
-    assertThat(file.toString()).isEqualTo("[moduleKey=ABCDE, relative=src/Foo.php, basedir=/path/to]");
+    DefaultInputFile file = new DefaultInputFile("ABCDE", "src/Foo.php");
+    assertThat(file.toString()).isEqualTo("[moduleKey=ABCDE, relative=src/Foo.php, basedir=null]");
   }
 }
index c7007cef6873da6aab38f25e2b03b08c9dde6e0f..2dd4cce3fe49e7c581b12a26ba79c221f9e4279a 100644 (file)
@@ -26,7 +26,6 @@ import org.junit.rules.TemporaryFolder;
 import org.sonar.api.batch.fs.InputFile;
 
 import java.io.File;
-import java.nio.file.Paths;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
@@ -74,8 +73,7 @@ public class DeprecatedDefaultInputFileTest {
 
   @Test
   public void test_toString() throws Exception {
-    DefaultInputFile file = new DefaultInputFile("ABCDE", "src/Foo.php")
-      .setModuleBaseDir(Paths.get("/foo/bar/"));
-    assertThat(file.toString()).isEqualTo("[moduleKey=ABCDE, relative=src/Foo.php, basedir=/foo/bar]");
+    DefaultInputFile file = new DefaultInputFile("ABCDE", "src/Foo.php");
+    assertThat(file.toString()).isEqualTo("[moduleKey=ABCDE, relative=src/Foo.php, basedir=null]");
   }
 }