|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.extensions.awt.script.ScriptStep
Encapsulate one step (line) from a script. Argument evaluation is deferred until the actual method invocation.
Fields inherited from interface junit.extensions.awt.script.Tags |
TAG_ACTION, TAG_ARGS, TAG_ASSERT, TAG_AWTTESTSCRIPT, TAG_CLASS, TAG_COMPONENT, TAG_COUNT, TAG_DESC, TAG_EVENT, TAG_FILENAME, TAG_ID, TAG_INVERT, TAG_INVOKER, TAG_KEYCHAR, TAG_KEYCODE, TAG_KIND, TAG_LAUNCH, TAG_METHOD, TAG_MODIFIERS, TAG_NAME, TAG_PARENT, TAG_POLL_INTERVAL, TAG_SCRIPT, TAG_SEQUENCE, TAG_TAG, TAG_TERMINATE, TAG_TIMEOUT, TAG_TITLE, TAG_TRIGGER, TAG_TYPE, TAG_VALUE, TAG_WAIT, TAG_WINDOW, TAG_X, TAG_Y |
Constructor Summary | |
ScriptStep(ComponentManager manager,
java.util.HashMap attributes)
|
|
ScriptStep(ComponentManager manager,
java.lang.String description)
|
Method Summary | |
static Step |
createStep(org.w3c.dom.Element el,
ComponentManager manager)
Factory method, equivalent to a "fromXML". |
static Step |
createStep(java.lang.String xml,
ComponentManager manager)
|
protected java.lang.String |
getAttributes()
Attributes to save in script. |
protected java.lang.String |
getContents()
Override if the step actually has some contents. |
protected abstract java.lang.String |
getDefaultDescription()
Return a reasonable default description for this script step. |
protected java.lang.String |
getDescription()
|
java.lang.Throwable |
getError()
|
junit.framework.AssertionFailedError |
getFailure()
|
protected ComponentManager |
getManager()
|
protected ComponentTester |
getTester()
|
protected abstract java.lang.String |
getUsage()
Provide a usage String for this step. |
protected abstract java.lang.String |
getXMLTag()
Define the XML tag to use for this script step. |
protected java.awt.Component |
resolve(java.lang.String name)
Resolve the given name into a component. |
protected ComponentTester |
resolveTester()
Override this to provide a more specific tester. |
void |
run()
Main run method, which stores any failures or exceptions for later retrieval. |
protected abstract void |
runStep()
Define this function to perform the actual script step work. |
protected void |
setError(java.lang.Throwable thr)
|
protected void |
setFailure(junit.framework.AssertionFailedError err)
|
java.lang.String |
toString()
Return a description of this script step. |
java.lang.String |
toXML()
Convert the object to XML. |
protected void |
usage()
Throw an invalid script exception describing the proper script usage. |
protected void |
usage(java.lang.String details)
Throw an invalid script exception describing the proper script usage. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public ScriptStep(ComponentManager manager, java.util.HashMap attributes)
public ScriptStep(ComponentManager manager, java.lang.String description)
Method Detail |
protected abstract java.lang.String getXMLTag()
protected abstract java.lang.String getUsage()
protected abstract java.lang.String getDefaultDescription()
protected void usage() throws InvalidScriptException
protected void usage(java.lang.String details) throws InvalidScriptException
protected java.lang.String getAttributes()
protected java.awt.Component resolve(java.lang.String name) throws ComponentNotFoundException
protected ComponentTester resolveTester()
protected ComponentTester getTester()
protected java.lang.String getDescription()
protected ComponentManager getManager()
public java.lang.Throwable getError()
protected void setError(java.lang.Throwable thr)
public junit.framework.AssertionFailedError getFailure()
protected void setFailure(junit.framework.AssertionFailedError err)
protected abstract void runStep() throws java.lang.Throwable
public void run() throws java.lang.Throwable
run
in interface Step
protected java.lang.String getContents()
public java.lang.String toXML()
toXML
in interface XMLifiable
public java.lang.String toString()
toString
in class java.lang.Object
public static Step createStep(java.lang.String xml, ComponentManager manager) throws InvalidScriptException
public static Step createStep(org.w3c.dom.Element el, ComponentManager manager) throws InvalidScriptException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |