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

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

The `Fail` class is responsible for throwing a failure error when it is evaluated. A `Fail` is often created if a critical piece of infomration is missing and another statement could not be properly generated.

See also

org.flexunit.runners.BlockFlexUnit4ClassRunner

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined By
--- | --- | ---
|  | 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
--- | --- | ---
|  | Fail(error:Error) Constructor. | Fail
|  | evaluate(previousToken:AsyncTestToken):void Throws the error that was initially provided to Fail. | Fail

Protected Methods
Show Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined By
--- | --- | ---
|  | 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

Fail | () | Constructor

`public function Fail(error:Error)`

Constructor.

Parameters

| `error:Error` — The `Error` to be thrown when this statement is evalutated.

Method Detail

evaluate | () | method

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

Throws the error that was initially provided to `Fail`.

Parameters

| `previousToken:AsyncTestToken` — AsyncTestToken - Passed in, but not used in this method.

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