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

Package | org.flexunit.internals.runners.statements
Class | public class SequencerWithDecoration
Inheritance | SequencerWithDecoration StatementSequencer AsyncStatementBase Object
Subclasses | RunAfters, RunBefores

Classes that inherit `SequencerWithDecoration` are used to run methods that run either before or after a class or before or after a test. The `SequencerWithDecoration` is provided an array of statements during instantiation. These statements can include information that indicate that they need to be decorated. If a Additional tasks can be added using the `#addStep` method before the sequence is evaluated. The decorated statements can be executed using the `#evaluate` method and any errors encountered during execution will be noted and reported.

See also

org.flexunit.internals.runners.statements.RunBefores
org.flexunit.internals.runners.statements.RunAfters

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
--- | --- | ---
|  | SequencerWithDecoration(steps:Array, target:Object) Constructor. | SequencerWithDecoration
|  | 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. | SequencerWithDecoration
|  | methodInvoker(method:FrameworkMethod, test:Object):IAsyncStatement Creates an InvokeMethod object for the given method and test class | SequencerWithDecoration
|  | 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
|  | withDecoration(method:FrameworkMethod, test:Object):IAsyncStatement Creates an object that implements an IAsyncStatement and decorates it | SequencerWithDecoration
|  | withPotentialAsync(method:FrameworkMethod, test:Object, statement:IAsyncStatement):IAsyncStatement Determine if a potential FrameworkMethod is asynchronous | SequencerWithDecoration

Constructor Detail

SequencerWithDecoration | () | Constructor

`public function SequencerWithDecoration(steps:Array, target:Object)`

Constructor.

Parameters

| `steps:Array` — An array of potential statements that need to be executed at a specific time
| `target:Object`

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.

methodInvoker | () | method |

`protected function methodInvoker(method:FrameworkMethod, test:Object):IAsyncStatement`

Creates an `InvokeMethod` object for the given method and test class

Parameters

| `method:FrameworkMethod` — The current method to execute
| `test:Object` — The test class

Returns

| `IAsyncStatement`

withDecoration | () | method |

`protected function withDecoration(method:FrameworkMethod, test:Object):IAsyncStatement`

Creates an object that implements an `IAsyncStatement` and decorates it

Parameters

| `method:FrameworkMethod` — The `FrameworkMethod` to wrap
| `test:Object` — The current test class

Returns

| `IAsyncStatement` — An object that implements an `IAsyncStatement` that has been decorated

withPotentialAsync | () | method |

`protected function withPotentialAsync(method:FrameworkMethod, test:Object, statement:IAsyncStatement):IAsyncStatement`

Determine if a potential `FrameworkMethod` is asynchronous

Parameters

| `method:FrameworkMethod` — The `FrameworkMethod` that the statement has wrapped
| `test:Object` — The current test class
| `statement:IAsyncStatement` — The current statement

Returns

| `IAsyncStatement` — An object that implements an `IAsyncStatement` that has been decorated with a potential async

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