Packageorg.flexunit.internals.runners.statements
Classpublic class Fail
InheritanceFail Inheritance AsyncStatementBase Inheritance 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
 PropertyDefined By
 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
  
Fail(error:Error)
Constructor.
Fail
  
evaluate(previousToken:AsyncTestToken):void
Throws the error that was initially provided to Fail.
Fail
Protected Methods
 MethodDefined By
 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
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.