public class MockOutputTool
extends Object
implements OutputTool
In-memory OutputTool used by tests. Nothing is written to disk by default, so test runs leave no filesystem artifacts.
Debugging: pass the groovydoc.mockOutputTool.dumpDir
system property to also mirror every output call to that directory.
Example (from the groovy-groovydoc module):
./gradlew :groovy-groovydoc:test -Dgroovydoc.mockOutputTool.dumpDir=build/mock-dump
When the property is unset, all calls are captured only in the in-memory
output and outputAreas maps; inspect them via
getText(String) or via a debugger breakpoint.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
copyResource(String srcPath, String dstPath) |
|
public String |
getText(String fileName) |
|
public boolean |
isValidOutputArea(String fileName) |
|
public void |
makeOutputArea(String filename) |
|
public String |
toString() |
|
public void |
writeToOutput(String fileName, String text, String charset) |