Packageorg.flexunit.internals.runners
Classpublic class ChildRunnerSequencer
InheritanceChildRunnerSequencer Inheritance StatementSequencer Inheritance AsyncStatementBase Inheritance 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
 PropertyDefined By
 Inheritederrors : Array
An array of errors that have been encountered during the execution of statements.
StatementSequencer
 InheritedmyToken : AsyncTestToken
The AsyncTestToken for the current statment.
AsyncStatementBase
 InheritedparentToken : AsyncTestToken
The AsyncTestToken for the parent of the current statment.
AsyncStatementBase
 Inheritedqueue : Array
An array of queued statements to run.
StatementSequencer
Public Methods
 MethodDefined By
  
ChildRunnerSequencer(children:Array, runChild:Function, notifier:IRunNotifier)
Constructor.
ChildRunnerSequencer
 Inherited
Adds a child that implements IAsyncStatement to the end of the queue of statments to execute by the sequencer.
StatementSequencer
 Inherited
evaluate(parentToken:AsyncTestToken):void
Starts evaluating the queue of statements that was provided to the sequencer.
StatementSequencer
 Inherited
Determine if any errors were encountered for a potential statement that has just run and returned the provided result.
StatementSequencer
 Inherited
toString():String
[override] Returns the current queue of statements that are in the sequence.
StatementSequencer
Protected Methods
 MethodDefined By
  
executeStep(child:*):void
[override] Evaluates the provided child if the child is an IAsyncStatement.
ChildRunnerSequencer
 Inherited
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
 ConstantDefined 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
COMPLETEConstant
public static const COMPLETE:String = complete