|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.itest.SRInteractiveTester
public class SRInteractiveTester
An interactive tester for console applications. Pass it the application IFLow
(and an optional IModel object), and then invoke the run
method.
InteractiveTester presents a command prompt '>' where you can type 'q' to
quit 'g' or 'go' to generate the next voicexml page. You can pass user input
as well, such as "g boston" The input simulates the results of running the
previous page on a VoiceXML server, where it would send user input back to
the web app hosting the SpeakRight application. 'bye' disconnect the session.
You can test this class using org.speakright.core.tests.TestInteractive
| Nested Class Summary | |
|---|---|
static interface |
SRInteractiveTester.CommandReader
Interface for supplying input to the tester. |
static interface |
SRInteractiveTester.ContentChecker
|
| Constructor Summary | |
|---|---|
SRInteractiveTester()
|
|
SRInteractiveTester(SRInteractiveTester.CommandReader reader)
|
|
| Method Summary | |
|---|---|
ISpeechPageWriter |
createPageWriter()
Create a page writer that renders SpeakRight output content into VoiceXML or whatever markup text you want. |
protected void |
execute()
Process the console input. |
void |
init(IFlow flow,
SRInstance run)
init the runner. |
protected boolean |
isDone()
Check if finished. |
boolean |
isFinished()
|
protected void |
readLine()
Read the next line from the console. |
void |
run()
Runs the application. |
void |
run(SRRunner run,
IFlow flow)
THIS ONE! |
SRInstance |
runner()
|
void |
setChecker(SRInteractiveTester.ContentChecker checker)
|
void |
setCommandReader(SRInteractiveTester.CommandReader reader)
|
void |
setOutputDir(java.lang.String path)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SRInteractiveTester()
public SRInteractiveTester(SRInteractiveTester.CommandReader reader)
| Method Detail |
|---|
public void setOutputDir(java.lang.String path)
public SRInstance runner()
public void setCommandReader(SRInteractiveTester.CommandReader reader)
public boolean isFinished()
public void setChecker(SRInteractiveTester.ContentChecker checker)
public void init(IFlow flow,
SRInstance run)
flow - the application flow objectrun - the runner object that has already been initializedpublic ISpeechPageWriter createPageWriter()
ISRExtensionFactory
createPageWriter in interface ISRExtensionFactoryprotected boolean isDone()
protected void readLine()
protected void execute()
public void run(SRRunner run,
IFlow flow)
run - app - public void run()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||