|
Griffon 0.9.5-rc2 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.ObjectGroovyTestCase
griffon.test.AbstractCliTestCase
abstract class AbstractCliTestCase extends GroovyTestCase
This abstract test case makes it easy to run a Griffon command and query its output. It's currently configured via a set of system properties:
Field Summary | |
---|---|
private String |
commandOutput
|
private Condition |
condition
|
private String |
griffonHome
|
private String |
griffonVersion
|
private Lock |
lock
|
private Process |
process
|
private boolean |
streamsProcessed
|
private File |
workDir
|
Property Summary | |
---|---|
File |
outputDir
|
long |
timeout
|
Constructor Summary | |
AbstractCliTestCase()
|
Method Summary | |
---|---|
void
|
enterInput(String input)
Allows you to provide user input for any commands that require it. |
protected void
|
execute(List command)
Executes a Griffon command. |
String
|
getOutput()
Returns the process output as a string. |
File
|
getWorkDir()
Returns the working directory for the current command. |
void
|
setOutput(String output)
|
void
|
setWorkDir(File dir)
|
protected void
|
signalDone()
Signals any threads waiting on condition to inform them that the process output stream has been read. |
protected void
|
verifyHeader()
Checks that the output of the current command starts with the expected header, which includes the Griffon version and the location of GRIFFON_HOME. |
int
|
waitForProcess()
Waits for the current command to finish executing. |
Field Detail |
---|
private String commandOutput
private final Condition condition
private String griffonHome
private String griffonVersion
private final Lock lock
private Process process
private boolean streamsProcessed
private File workDir
Property Detail |
---|
File outputDir
long timeout
Constructor Detail |
---|
AbstractCliTestCase()
Method Detail |
---|
void enterInput(String input)
protected void execute(List command)
a
- list of command arguments (minus the Griffon script/executable).
String getOutput()
File getWorkDir()
void setOutput(String output)
void setWorkDir(File dir)
protected void signalDone()
protected final void verifyHeader()
int waitForProcess()
Groovy Documentation