Package | org.flexunit.internals.runners.statements |
Interface | public interface IAsyncHandlingStatement |
Implementors | ExpectAsync |
IAsyncHandlingStatement
is an interface for statements that handle asynchronous functionality
for tests. If a statement is going to be handlining asynchronous tests, it needs to implement this interface.
Property | Defined By | ||
---|---|---|---|
bodyExecuting : Boolean [read-only]
Returns a Boolean value indicating whether the test method is current executing. | IAsyncHandlingStatement |
Method | Defined By | ||
---|---|---|---|
asyncErrorConditionHandler(eventHandler:Function):Function | IAsyncHandlingStatement | ||
asyncHandler(eventHandler:Function, timeout:int, passThroughData:Object = null, timeoutHandler:Function = null):Function
Creates an AsyncHandler that pend and either call the eventHandler or the
timeoutHandler, passing the passThroughData, depending on whether the
timeout period has been reached. | IAsyncHandlingStatement | ||
asyncNativeResponder(resultHandler:Function, faultHandler:Function, timeout:int, passThroughData:Object = null, timeoutHandler:Function = null):Responder
Creates an IAsyncNativeTestResponder that pend and either call the eventHandler or the
timeoutHandler, passing the passThroughData, depending on whether the
timeout period has been reached. | IAsyncHandlingStatement | ||
asyncResponder(responder:*, timeout:int, passThroughData:Object = null, timeoutHandler:Function = null):IResponder
Creates an IAsyncTestResponder that pend and either call the eventHandler or the
timeoutHandler, passing the passThroughData, depending on whether the
timeout period has been reached. | IAsyncHandlingStatement | ||
failOnComplete(event:Event, passThroughData:Object):void
A handler method that is called in order to fail for a given asynchronous event once an it
has been dispatched. | IAsyncHandlingStatement | ||
handleBindableNextSequence(event:Event, sequenceRunner:SequenceRunner):void | IAsyncHandlingStatement | ||
handleNextSequence(event:Event, sequenceRunner:SequenceRunner):void
Handles the next steps in a SequenceRunner. | IAsyncHandlingStatement | ||
pendUntilComplete(event:Event, passThroughData:Object = null):void
A handler method that is called in order to wait once an asynchronous event has been dispatched. | IAsyncHandlingStatement |
bodyExecuting | property |
bodyExecuting:Boolean
[read-only] Returns a Boolean value indicating whether the test method is current executing.
public function get bodyExecuting():Boolean
asyncErrorConditionHandler | () | method |
public function asyncErrorConditionHandler(eventHandler:Function):Function
Parameters
eventHandler:Function |
Function |
asyncHandler | () | method |
public function asyncHandler(eventHandler:Function, timeout:int, passThroughData:Object = null, timeoutHandler:Function = null):Function
Creates an AsyncHandler
that pend and either call the eventHandler
or the
timeoutHandler
, passing the passThroughData
, depending on whether the
timeout
period has been reached.
Parameters
eventHandler:Function — The Function that will be executed if the handler is called before
the timeout has expired.
| |
timeout:int — The length of time, in milliseconds, before the timeoutHandler will be executed.
| |
passThroughData:Object (default = null ) — An Object that can be given information about the current test; this information will
be available for both the eventHandler and the timeoutHandler .
| |
timeoutHandler:Function (default = null ) — The Function that will be executed if the timeout time is reached prior to
the expected event being dispatched.
|
Function — an event handler Function that will determine whether the timeout has been reached.
|
asyncNativeResponder | () | method |
public function asyncNativeResponder(resultHandler:Function, faultHandler:Function, timeout:int, passThroughData:Object = null, timeoutHandler:Function = null):Responder
Creates an IAsyncNativeTestResponder
that pend and either call the eventHandler
or the
timeoutHandler
, passing the passThroughData
, depending on whether the
timeout
period has been reached.
Parameters
resultHandler:Function — The result function that will be executed if the Responder is called before
the timeout has expired.
| |
faultHandler:Function — The fault function that will be executed if the Responder is called before
the timeout has expired.
| |
timeout:int — The length of time, in milliseconds, before the timeoutHandler will be executed.
| |
passThroughData:Object (default = null ) — An Object that can be given information about the current test; this information will
be available for both the eventHandler and the timeoutHandler .
| |
timeoutHandler:Function (default = null ) — The Function that will be executed if the timeout time is reached prior to
the expected event being dispatched.
|
Responder — a Responder that will determine whether the timeout has been reached.
|
asyncResponder | () | method |
public function asyncResponder(responder:*, timeout:int, passThroughData:Object = null, timeoutHandler:Function = null):IResponder
Creates an IAsyncTestResponder
that pend and either call the eventHandler
or the
timeoutHandler
, passing the passThroughData
, depending on whether the
timeout
period has been reached.
Parameters
responder:* — The responder that will be executed if the IResponder is called before
the timeout has expired.
| |
timeout:int — The length of time, in milliseconds, before the timeoutHandler will be executed.
| |
passThroughData:Object (default = null ) — An Object that can be given information about the current test; this information will
be available for both the eventHandler and the timeoutHandler .
| |
timeoutHandler:Function (default = null ) — The Function that will be executed if the timeout time is reached prior to
the expected event being dispatched.
|
IResponder — an IResponder that will determine whether the timeout has been reached.
|
failOnComplete | () | method |
public function failOnComplete(event:Event, passThroughData:Object):void
A handler method that is called in order to fail for a given asynchronous event once an it has been dispatched.
Parameters
event:Event — The event that was received.
| |
passThroughData:Object — An Object that contains information to pass to the handler.
|
handleBindableNextSequence | () | method |
public function handleBindableNextSequence(event:Event, sequenceRunner:SequenceRunner):void
Parameters
event:Event | |
sequenceRunner:SequenceRunner |
handleNextSequence | () | method |
public function handleNextSequence(event:Event, sequenceRunner:SequenceRunner):void
Handles the next steps in a SequenceRunner
.
Parameters
event:Event — The event boradcast by the last step in the sequence.
| |
sequenceRunner:SequenceRunner — The runner responsible for running the steps in the sequence.
|
pendUntilComplete | () | method |
public function pendUntilComplete(event:Event, passThroughData:Object = null):void
A handler method that is called in order to wait once an asynchronous event has been dispatched.
Parameters
event:Event — The event that was received.
| |
passThroughData:Object (default = null ) — An Object that contains information to pass to the handler.
|