API Documentation | All Packages | All Classes | Index | Frames No Frames |
AsyncStatementBase

Package | org.flexunit.internals.runners.statements
Class | public class AsyncStatementBase
Inheritance | AsyncStatementBase Object
Subclasses | AssignmentSequencer, ExpectAsync, ExpectException, Fail, FailOnTimeout, InvokeMethod, MethodCompleteWithParamsStatement, MethodRuleBase, RunAftersInline, RunBeforesInline, StatementSequencer, TheoryAnchor, TheoryBlockRunnerStatement

The `AsyncStatementBase` is responsible for notifiying a parent token that a task has been completed. Many statement classes extend from this class in order to notify a parent statement that it has finished. Classes that extend from the `AsyncStatementBase` can communicate with a parent class that has provided an `AsyncTestToken` and notify the parent class when the class has finished its specific task. A class that extends from the `AsyncStatementBase` calls the `#sendComplete()` method once a parent `AsyncTestToken` is supplied. The parent token will then be notified of a potential error that was encountered when running the `AsyncStatementBase`.

Protected Properties

| Property | Defined By
--- | --- | ---
|  | myToken : AsyncTestToken The AsyncTestToken for the current statment. | AsyncStatementBase
|  | parentToken : AsyncTestToken The AsyncTestToken for the parent of the current statment. | AsyncStatementBase

Public Methods

| Method | Defined By
--- | --- | ---
|  | AsyncStatementBase() Constructor. | AsyncStatementBase

Protected Methods

| Method | Defined By
--- | --- | ---
|  | sendComplete(error:Error = null):void If the parentToken has not already been alerted that the statement has completed, alert the parent token that the current statement has finished. | AsyncStatementBase

Property Detail

myToken | property

`protected var myToken:AsyncTestToken`

The `AsyncTestToken` for the current statment.

parentToken | property |

`protected var parentToken:AsyncTestToken`

The `AsyncTestToken` for the parent of the current statment. This is notified when the current statement has finished.

See also

sendComplete()
Constructor Detail

AsyncStatementBase | () | Constructor

`public function AsyncStatementBase()`

Constructor.

Method Detail

sendComplete | () | method

`protected function sendComplete(error:Error = null):void`

If the parentToken has not already been alerted that the statement has completed, alert the parent token that the current statement has finished.

Parameters

| `error:Error` (default = `null`)`` — The Error to send to the parentToken.

Thu Apr 10 2014, 08:07 AM +10:00