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

Package | org.flexunit.events.rule
Class | public class EventRule
Inheritance | EventRule MethodRuleBase AsyncStatementBase Object
Implements | IMethodRule

User stories User sets a complex expectation on an event without a timeout User sets a complex expectations on two different events without a timeout User sets two different expectations on the same event without a timeout For example, the first time it has property A set the second time it has property B set User sets a complex expectation on an event with a timeout User sets a complex expectations on two different events with a timeout User sets two different expectations on the same event with a timeout

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
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | EventRule() | EventRule
|  | 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 [override] | EventRule
|  | from(dispatcher:IEventDispatcher):IEventExpectation | EventRule
|  | 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 [override] | EventRule
|  | 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

Constructor Detail

EventRule | () | Constructor

`public function EventRule()`

Method Detail

evaluate | () | method

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

Parameters

| `parentToken:AsyncTestToken`

from | () | method |

`public function from(dispatcher:IEventDispatcher):IEventExpectation`

Parameters

| `dispatcher:IEventDispatcher`

Returns

| `IEventExpectation`

handleStatementComplete | () | method |

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

Parameters

| `result:ChildResult`

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