@Test public void testDoNotCreateAntOutputLoggerFile() throws Exception { final MockCommandline mockCommandline = new MockCommandline(); mockCommandline.setAssertCorrectCommandline(false); mockCommandline.setProcessInputStream( new ByteArrayInputStream("some stuff\nmore stuff\n".getBytes())); mockCommandline.setProcessErrorStream(new ByteArrayInputStream("".getBytes())); final Script dummyScript = new Script() { public Commandline buildCommandline() throws CruiseControlException { return mockCommandline; } public void setExitCode(int result) { } public int getExitCode() { return 0; } }; final ScriptRunner sr = new ScriptRunner(); sr.runScript(TestUtil.getTargetDir(), dummyScript, ScriptRunner.NO_TIMEOUT); final File expectedAntBuilderLog = new File(TestUtil.getTargetDir(), AntOutputLogger.DEFAULT_OUTFILE_NAME); assertFalse("Generic ScriptRunner should not have created AntOuputLogger file: " + expectedAntBuilderLog.getAbsolutePath(), expectedAntBuilderLog.exists()); }
public boolean runScript(final File workingDir, final Script script, final long timeout) throws CruiseControlException { return runScript(workingDir, script, timeout, null, null); }
ScriptRunner { public boolean runScript(final File workingDir, final Script script, final long timeout) throws CruiseControlException { return runScript(workingDir, script, timeout, null, null); } }
ScriptRunner { public boolean runScript(final File workingDir, final Script script, final long timeout) throws CruiseControlException { return runScript(workingDir, script, timeout, null, null); }  }
ScriptRunner { public boolean runScript(final File workingDir, final Script script, final long timeout) throws CruiseControlException { return runScript(workingDir, script, timeout, null, null); }  boolean runScript(final File workingDir, final Script script, final long timeout); boolean runScript(final File workingDir, final Script script, final long timeout,
                             final BuildOutputLogger buildOutputConsumer); boolean runScript(final File workingDir, final Script script, final long timeout,
                             final InputStream scriptInputProvider, final BuildOutputLogger buildOutputConsumer); boolean runScript(Script script, long timeout, BuildOutputLogger logger); }
ScriptRunner { public boolean runScript(final File workingDir, final Script script, final long timeout) throws CruiseControlException { return runScript(workingDir, script, timeout, null, null); }  boolean runScript(final File workingDir, final Script script, final long timeout); boolean runScript(final File workingDir, final Script script, final long timeout,
                             final BuildOutputLogger buildOutputConsumer); boolean runScript(final File workingDir, final Script script, final long timeout,
                             final InputStream scriptInputProvider, final BuildOutputLogger buildOutputConsumer); boolean runScript(Script script, long timeout, BuildOutputLogger logger); static final long NO_TIMEOUT; }