flexunit.framework.Assert
| Test |
| WarningTestCase |
| flexunit.flexui.TestRunner, Assert, TestSuite, TestResult |
| Property Summary | |
| className:String [read-only]Returns the the fully qualified class name |
| methodName:String
The method name of the individual test to be run |
| Constructor Summary | |
TestCase(methodName:String = null)
The TestCase constructor. |
|
| Method Summary | |
| addAsync(func:Function, timeout:int, passThroughData:Object = null, failFunc:Function = null) : Function
Add an asynchronous check point to the test. |
| countTestCases() : Number
The number of test cases in this test class. |
| getNextAsync() : Object
The AsyncTestHelper will call this when it's ready for to start the next async. |
| getTestMethodNames() : Array |
| hasAsync() : Boolean
Returns true if there are any asynchronous methods remaining to be called |
| run() : TestResult
Creates a new TestResult and runs the tests, populating that TestResult
with the results. |
| runFinish() : void
Runs tearDown()
|
| runMiddle() : void
Runs the normal test method or the next asynchronous method |
| runStart() : void
Runs setUp()
|
| runWithResult(result:TestResult) : void
Runs the tests, populating the result parameter. |
| setTestResult(result:TestResult) : void
Called by the TestResult to pass along so that it can be passed for async |
| setUp() : void
Empty implementation of setUp(). |
| startAsync() : void
Called by the TestResult to kick off wait for the next asynchronous method |
| tearDown() : void
Empty implementation of tearDown(). |
| toString() : String
A string representation of the test case |
| Property Detail |
className:String
public function get className() : String
public var methodName:String
| Constructor Detail |
public function TestCase(methodName:String = null)
TestCase subclass,
you should ensure that this constructor is called.
Parameters
methodName:String (default = null) — name of the test method to be called in the test run.
|
| Method Detail |
public function addAsync(func:Function, timeout:int, passThroughData:Object = null, failFunc:Function = null) : Function
func:Function — the Function to execute when things have been handled
|
|
timeout:int — if the function isn't called within this time the test is considered a failure
|
|
passThroughData:Object (default = null) — data that will be passed to your function (only if non-null) as the 2nd argument
|
|
failFunc:Function (default = null) — a Function that will be called if the asynchronous function fails to execute, useful if perhaps the failure to
execute was intentional or if you want a specific failure message
|
Function — the Function that can be used as an event listener
|
public function countTestCases() : Number
Number — A Number representation the count of test cases in this test class. Always returns 1 for TestCase
|
public function getNextAsync() : Object
Object |
public function getTestMethodNames() : Array
Array |
public function hasAsync() : Boolean
Boolean |
public function run() : TestResult
TestResult and runs the tests, populating that TestResult
with the results.
Returns
TestResult |
public function runFinish() : void
tearDown()
Returns
void |
public function runMiddle() : void
void |
public function runStart() : void
setUp()
Returns
void |
public function runWithResult(result:TestResult) : void
result parameter.
Parameters
result:TestResult — TestResult instance to be populated
|
void |
public function setTestResult(result:TestResult) : void
result:TestResult |
void |
public function setUp() : void
setUp(). Can be overridden in test class.
Returns
void |
public function startAsync() : void
void |
public function tearDown() : void
tearDown(). Can be overridden in test class.
Returns
void |
public function toString() : String
String — A string representation of the test class name and the test method name.
|