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

Package | org.flexunit.internals.runners.statements
Class | public class MethodRuleBase
Inheritance | MethodRuleBase AsyncStatementBase Object
Implements | IAsyncStatement
Subclasses | EventRule

Base implemention class for an IMethodRule. Provides scaffolding for extension

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined By
--- | --- | ---
|  | baseStatement : IAsyncStatement an instance variable which holds the next statement in the descending stack | MethodRuleBase
|  | 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
--- | --- | ---
|  | MethodRuleBase() Constructor | MethodRuleBase
|  | apply(base:IAsyncStatement, method:FrameworkMethod, test:Object):IAsyncStatement Called when this rule is added to the wrapping set of statements before a test method exectuion | MethodRuleBase
|  | evaluate(parentToken:AsyncTestToken):void Called when it is time for this rule to do its job. | MethodRuleBase
|  | toString():String [override] A method which must be overriden in subclasses. | MethodRuleBase

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | handleStatementComplete(result:ChildResult):void called when the baseStatement has completed its post-test work. | MethodRuleBase
|  | proceedToNextStatement():void Convenience method for notifying the next statement that it can begin its pretest work | MethodRuleBase
|  | 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

baseStatement | property

`protected var baseStatement:IAsyncStatement`

an instance variable which holds the next statement in the descending stack

Constructor Detail

MethodRuleBase | () | Constructor

`public function MethodRuleBase()`

Constructor

Method Detail

apply | () | method

`public function apply(base:IAsyncStatement, method:FrameworkMethod, test:Object):IAsyncStatement`

Called when this rule is added to the wrapping set of statements before a test method exectuion

Parameters

| `base:IAsyncStatement` — the next statement in the descending stack
| `method:FrameworkMethod` — the method that will be tested
| `test:Object` — instance where that method is declared

Returns

| `IAsyncStatement` — an IAsyncStatement

evaluate | () | method |

`public function evaluate(parentToken:AsyncTestToken):void`

Called when it is time for this rule to do its job.

Parameters

| `parentToken:AsyncTestToken` — token that the rule should store and use to notify the previous statement when it is completed its work

handleStatementComplete | () | method |

`protected function handleStatementComplete(result:ChildResult):void`

called when the baseStatement has completed its post-test work. Allows this statement to do work post test

Parameters

| `result:ChildResult` — the result of the base statements execution

proceedToNextStatement | () | method |

`protected function proceedToNextStatement():void`

Convenience method for notifying the next statement that it can begin its pretest work

toString | () | method |

`override public function toString():String`

A method which must be overriden in subclasses. Crucial to debugging errant rules

Returns

| `String` —

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