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

Package | org.flexunit.internals.runners
Class | public class ChildRunnerSequencer
Inheritance | ChildRunnerSequencer StatementSequencer AsyncStatementBase Object
Implements | IAsyncStatement

The `ChildRunnerSequencer` is used to sequence children of specific class. These children are evaluted using a function provided to the sequencer in its constructor. These children can be provided to the `ChildRunnerSequencer` as an array during instantiation or added using the `#addStep` method. The list of children can be evaluated using the `#evaluate` method and any errors encountered during execution will be noted and reported. Each child will be run in sequence, waiting for the previous child to finish running before starting the next.

See also

org.flexunit.runners.ParentRunner

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined By
--- | --- | ---
|  | errors : Array An array of errors that have been encountered during the execution of statements. | StatementSequencer
|  | myToken : AsyncTestToken The AsyncTestToken for the current statment. | AsyncStatementBase
|  | parentToken : AsyncTestToken The AsyncTestToken for the parent of the current statment. | AsyncStatementBase
|  | queue : Array An array of queued statements to run. | StatementSequencer

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | ChildRunnerSequencer(children:Array, runChild:Function, notifier:IRunNotifier) Constructor. | ChildRunnerSequencer
|  | addStep(child:IAsyncStatement):void Adds a child that implements IAsyncStatement to the end of the queue of statments to execute by the sequencer. | StatementSequencer
|  | evaluate(parentToken:AsyncTestToken):void Starts evaluating the queue of statements that was provided to the sequencer. | StatementSequencer
|  | handleChildExecuteComplete(result:ChildResult):void Determine if any errors were encountered for a potential statement that has just run and returned the provided result. | StatementSequencer
|  | toString():String [override] Returns the current queue of statements that are in the sequence. | StatementSequencer

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | executeStep(child:*):void [override] Evaluates the provided child if the child is an IAsyncStatement. | ChildRunnerSequencer
|  | sendComplete(error:Error = null):void [override] If an error is provided, it will be added to the list of errors encountered during the execution of the statements. | StatementSequencer

Public Constants

| Constant | Defined By
--- | --- | ---
|  | COMPLETE : String = complete [static] | ChildRunnerSequencer

Constructor Detail

ChildRunnerSequencer | () | Constructor

`public function ChildRunnerSequencer(children:Array, runChild:Function, notifier:IRunNotifier)`

Constructor.

Parameters

| `children:Array` — An `Array` of children.
| `runChild:Function` — A `Function` that will be run against each child.
| `notifier:IRunNotifier` — An `IRunNottifer` that will report on a child running in the `runChild` method.

Method Detail

executeStep | () | method

`override protected function executeStep(child:*):void`

Evaluates the provided `child` if the `child` is an `IAsyncStatement`.

Parameters

| `child:*` — The child object to be evaluated.

Constant Detail

COMPLETE | Constant

`public static const COMPLETE:String = complete`

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