|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Object GroovyTestCase grails.test.AbstractCliTestCase
abstract class AbstractCliTestCase extends GroovyTestCase
This abstract test case makes it easy to run a Grails command and query its output. It's currently configured via a set of system properties:
Property Summary | |
---|---|
java.io.File |
outputDir
|
long |
timeout
|
Method Summary | |
---|---|
void
|
enterInput(java.lang.String input)
Allows you to provide user input for any commands that require it. |
protected void
|
execute(java.util.List command)
Executes a Grails command. |
java.lang.String
|
getOutput()
Returns the process output as a string. |
java.io.File
|
getWorkDir()
Returns the working directory for the current command. |
void
|
setOutput(java.lang.String output)
|
void
|
setWorkDir(java.io.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 Grails version and the location of GRAILS_HOME. |
int
|
waitForProcess()
Waits for the current command to finish executing. |
Property Detail |
---|
java.io.File outputDir
long timeout
Method Detail |
---|
void enterInput(java.lang.String input)
protected void execute(java.util.List command)
a
- list of command arguments (minus the Grails script/executable).
java.lang.String getOutput()
java.io.File getWorkDir()
void setOutput(java.lang.String output)
void setWorkDir(java.io.File dir)
protected void signalDone()
protected final void verifyHeader()
int waitForProcess()
Groovy Documentation