@Test public void should_init_default_project_dirs() throws Exception { p.put("sonar.task", "scan"); new Dirs(mock(Logger.class)).init(p); File projectDir = new File(p.get(ScanProperties.PROJECT_BASEDIR)); File workDir = new File(p.get(ScannerProperties.WORK_DIR)); assertThat(projectDir).isNotNull().isDirectory(); assertThat(workDir).isNotNull(); assertThat(projectDir.getCanonicalPath()).isEqualTo(new File(".").getCanonicalPath()); assertThat(workDir.getName()).isEqualTo(".scannerwork"); assertThat(workDir.getParentFile()).isEqualTo(projectDir); }
void init(Map<String, String> p) { boolean onProject = Utils.taskRequiresProject(p); if (onProject) { initProjectDirs(p); } else { initTaskDirs(p); } }
Dirs { void init(Map<String, String> p) { boolean onProject = Utils.taskRequiresProject(p); if (onProject) { initProjectDirs(p); } else { initTaskDirs(p); } } }
Dirs { void init(Map<String, String> p) { boolean onProject = Utils.taskRequiresProject(p); if (onProject) { initProjectDirs(p); } else { initTaskDirs(p); } } Dirs(Logger logger); }
Dirs { void init(Map<String, String> p) { boolean onProject = Utils.taskRequiresProject(p); if (onProject) { initProjectDirs(p); } else { initTaskDirs(p); } } Dirs(Logger logger);  }
Dirs { void init(Map<String, String> p) { boolean onProject = Utils.taskRequiresProject(p); if (onProject) { initProjectDirs(p); } else { initTaskDirs(p); } } Dirs(Logger logger);   }