Packageorg.flexunit.internals.runners.statements
Classpublic class MethodRuleBase
InheritanceMethodRuleBase Inheritance AsyncStatementBase Inheritance Object
Implements IAsyncStatement
Subclasses EventRule

Base implemention class for an IMethodRule. Provides scaffolding for extension



Protected Properties
 PropertyDefined By
  baseStatement : IAsyncStatement
an instance variable which holds the next statement in the descending stack
MethodRuleBase
 InheritedmyToken : AsyncTestToken
The AsyncTestToken for the current statment.
AsyncStatementBase
 InheritedparentToken : AsyncTestToken
The AsyncTestToken for the parent of the current statment.
AsyncStatementBase
Public Methods
 MethodDefined By
  
Constructor
MethodRuleBase
  
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
 MethodDefined By
  
called when the baseStatement has completed its post-test work.
MethodRuleBase
  
Convenience method for notifying the next statement that it can begin its pretest work
MethodRuleBase
 Inherited
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
baseStatementproperty
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