import org.sonar.api.batch.fs.InputFile;
import java.io.File;
-import java.nio.file.Paths;
import static org.assertj.core.api.Assertions.assertThat;
@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]");
}
}
import org.sonar.api.batch.fs.InputFile;
import java.io.File;
-import java.nio.file.Paths;
import static org.assertj.core.api.Assertions.assertThat;
@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]");
}
}