@Test public void execute() throws Exception { File marker = folder.newFile(ConfigurationDetecter.MARKER_FILE_NAME); File output = folder.newFile(); Assume.assumeTrue(output.delete() || output.exists() == false); assertThat(ConfigurationDetecter.execute(output, testLoader), is(0)); File result = ConfigurationDetecter.read(output); assertThat(result.getCanonicalPath(), is(marker.getParentFile().getCanonicalPath())); }
static int execute(File path, ClassLoader classLoader) { assert path != null; assert classLoader != null; try { File conf = detectConfigurationDirectory(classLoader); write(conf, path); } catch (Exception e) { e.printStackTrace(System.err); return 1; } return 0; }
ConfigurationDetecter { static int execute(File path, ClassLoader classLoader) { assert path != null; assert classLoader != null; try { File conf = detectConfigurationDirectory(classLoader); write(conf, path); } catch (Exception e) { e.printStackTrace(System.err); return 1; } return 0; } }
ConfigurationDetecter { static int execute(File path, ClassLoader classLoader) { assert path != null; assert classLoader != null; try { File conf = detectConfigurationDirectory(classLoader); write(conf, path); } catch (Exception e) { e.printStackTrace(System.err); return 1; } return 0; } private  ConfigurationDetecter(); }
ConfigurationDetecter { static int execute(File path, ClassLoader classLoader) { assert path != null; assert classLoader != null; try { File conf = detectConfigurationDirectory(classLoader); write(conf, path); } catch (Exception e) { e.printStackTrace(System.err); return 1; } return 0; } private  ConfigurationDetecter(); static void main(String[] args); static File read(File path); }
ConfigurationDetecter { static int execute(File path, ClassLoader classLoader) { assert path != null; assert classLoader != null; try { File conf = detectConfigurationDirectory(classLoader); write(conf, path); } catch (Exception e) { e.printStackTrace(System.err); return 1; } return 0; } private  ConfigurationDetecter(); static void main(String[] args); static File read(File path);  }