@Test public void testConfigFileLocations() { ToolOptions options = ToolOptions.builder().withPath(LOG_DIR).build(); List<Path> locations = EcLogYamlConfigLoader.getConfigFileLocations(options); assertThat(locations).containsExactly(WORKING_DIR.resolve(EXPECTED_FILE_NAME), LOG_DIR.resolve(EXPECTED_FILE_NAME)); }
static List<Path> getConfigFileLocations(ToolOptions options) { List<Path> paths = new ArrayList<>(); options.config().ifPresent(paths::add); paths.add(Paths.get(System.getProperty("user.dir"), FILE_NAME)); paths.add(options.path().resolve(FILE_NAME)); return paths; }
EcLogYamlConfigLoader { static List<Path> getConfigFileLocations(ToolOptions options) { List<Path> paths = new ArrayList<>(); options.config().ifPresent(paths::add); paths.add(Paths.get(System.getProperty("user.dir"), FILE_NAME)); paths.add(options.path().resolve(FILE_NAME)); return paths; } }
EcLogYamlConfigLoader { static List<Path> getConfigFileLocations(ToolOptions options) { List<Path> paths = new ArrayList<>(); options.config().ifPresent(paths::add); paths.add(Paths.get(System.getProperty("user.dir"), FILE_NAME)); paths.add(options.path().resolve(FILE_NAME)); return paths; } private  EcLogYamlConfigLoader(); }
EcLogYamlConfigLoader { static List<Path> getConfigFileLocations(ToolOptions options) { List<Path> paths = new ArrayList<>(); options.config().ifPresent(paths::add); paths.add(Paths.get(System.getProperty("user.dir"), FILE_NAME)); paths.add(options.path().resolve(FILE_NAME)); return paths; } private  EcLogYamlConfigLoader(); static EcLogYamlConfig load(ToolOptions options); }
EcLogYamlConfigLoader { static List<Path> getConfigFileLocations(ToolOptions options) { List<Path> paths = new ArrayList<>(); options.config().ifPresent(paths::add); paths.add(Paths.get(System.getProperty("user.dir"), FILE_NAME)); paths.add(options.path().resolve(FILE_NAME)); return paths; } private  EcLogYamlConfigLoader(); static EcLogYamlConfig load(ToolOptions options);  }