com.google.testing.threadtester
Class ScriptedTask<T>
java.lang.Object
com.google.testing.threadtester.ScriptedTask<T>
- Type Parameters:
T - the type of the object-under-test. This is the
same type as that of the owning Script object.
public abstract class ScriptedTask<T>
- extends Object
A task added to a Script. Each task should provide
a concrete implementation of the execute() method.
- Author:
- alasdair.mackintosh@gmail.com (Alasdair Mackintosh)
|
Method Summary |
abstract void |
execute()
Executes this task. |
void |
releaseTo(Script<T> other)
Releases control to another script. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptedTask
public ScriptedTask()
execute
public abstract void execute()
throws Exception
- Executes this task. During execution, operations will typically
be carried out on the object-under-test. In addition, control
can be transferred to another script by calling
releaseTo(com.google.testing.threadtester.Script).
- Throws:
Exception
releaseTo
public void releaseTo(Script<T> other)
- Releases control to another script. Releasing control will
pause the Script that owns this task, and allow the other
script to continue executing. This method should be invoked
during {#link execute}.
Copyright © 2013. All Rights Reserved.