flexunit.framework

Class TestSuite



All implemented interfaces
Test

public class TestSuite




Property Summary
className:String  [read-only]
Returns the fully qualified class name.
name:String                                        
testArrayList:Collection


Constructor Summary
TestSuite(param:Object = null)
The TestSuite constructor, provided with the test to be run.


Method Summary
addTest(test:Test) : void
Adds a test to this test suite.
addTestSuite(testClass:Class) : void
Wraps a test inside a TestSuite and adds it to this test suite.
countTestCases() : Number
Iterates all tests in this suite to calculate the total number of tests in this suite.
getTestMethodNames() : Array
Returns the names of the test methods for this test.
getTests() : Array
Returns all the tests in this test suite as an Array
runNext(result:TestResult) : void                                        
runWithResult(result:TestResult) : void
Runs the test, populating result with the test results.
testCount() : Number
The number of tests added to this suite.
toString() : String                                        


Property Detail

className Property

Usage
    className:String

Implementation
    public function get className() : String

Returns the fully qualified class name.

name Property

public var name:String


testArrayList Property

public var testArrayList:Collection



Constructor Detail

TestSuite Constructor

public function TestSuite(param:Object = null)

The TestSuite constructor, provided with the test to be run.

Parameters
param:Object (default = null) — test class to be run. Can be a TestCase, another TestSuite or any class that implements the Test interface.


Method Detail

addTest Method

public function addTest(test:Test) : void

Adds a test to this test suite.

Parameters
test:TestTest instance to be added.

Returns
void

addTestSuite Method

public function addTestSuite(testClass:Class) : void

Wraps a test inside a TestSuite and adds it to this test suite.

Parameters
testClass:ClassClass that extends TestCase which will be added as a test suite.

Returns
void

countTestCases Method

public function countTestCases() : Number

Iterates all tests in this suite to calculate the total number of tests in this suite.

Returns
Number — A Number containing the count of all tests in this suite.

getTestMethodNames Method

public function getTestMethodNames() : Array

Returns the names of the test methods for this test.

Returns
Array — Array of method names for this test

getTests Method

public function getTests() : Array

Returns all the tests in this test suite as an Array

Returns
Array — An Array containing the tests in this test suite.

runNext Method

public function runNext(result:TestResult) : void

Parameters
result:TestResult

Returns
void

runWithResult Method

public function runWithResult(result:TestResult) : void

Runs the test, populating result with the test results.

Parameters
result:TestResultTestResult instance to be populated with the test results.

Returns
void

testCount Method

public function testCount() : Number

The number of tests added to this suite.

Returns
Number — A Number containing the number of tests added to this suite.

toString Method

public function toString() : String

Returns
String