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

Package | org.flexunit.async
Class | public class TestResponder
Inheritance | TestResponder Object
Implements | ITestResponder

A respoder for tests that contains `Function`s for the test succeeding or the test failing to succeed.

Public Methods

| Method | Defined By
--- | --- | ---
|  | TestResponder(result:Function, fault:Function) Constructor. | TestResponder
|  | fault(info:Object, passThroughData:Object):void This method is called by TestCase when an error has been received. | TestResponder
|  | result(data:Object, passThroughData:Object):void This method is called by TestCase when the return value has been received. | TestResponder

Constructor Detail

TestResponder | () | Constructor

`public function TestResponder(result:Function, fault:Function)`

Constructor.

Parameters

| `result:Function` — A `Function` that handles results and expects an info and passThroughData parameter. `public function result( info:Object, passThroughData:Object ):void { ... }`
| `fault:Function` — A `Function` that handles faults and expects a data and passThroughData parameter. `public function fault( data:Object, passThroughData:Object ):void { ... }`

Method Detail

fault | () | method

`public function fault(info:Object, passThroughData:Object):void`

This method is called by TestCase when an error has been received.

Parameters

| `info:Object` — An Object containing information about why the fault occured
| `passThroughData:Object` — An Object containing data that is to be passed to the fault handler function

result | () | method |

`public function result(data:Object, passThroughData:Object):void`

This method is called by TestCase when the return value has been received.

Parameters

| `data:Object` — An Object containing information about the result
| `passThroughData:Object` — An Object containing data that is to be passed to the result handler function

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