| Package | org.flexunit.runner |
| Class | public class Description |
| Inheritance | Description Object |
| Implements | IDescription |
Description describes a suite, test case, or test which is to be run or has been run.
Descriptions can be atomic (a single test) or compound (containing children tests).
Descriptions are used to provide feedback about the tests that are about to run (for example,
the tree view visible in many IDEs) or tests that have been run (for example, the failures view).
This information can be used to report the current progress of the test run.
Descriptions are implemented as a single class rather than a composite because
they are entirely informational. They contain no logic aside from counting their tests.
See also
| Property | Defined By | ||
|---|---|---|---|
| children : Array [read-only]
| Description | ||
| displayName : String [read-only]
| Description | ||
| EMPTY : Description [static]
Global instance of an empty test description which can be returned
| Description | ||
| isEmpty : Boolean [read-only]
| Description | ||
| isInstance : Boolean [read-only]
| Description | ||
| isSuite : Boolean [read-only]
| Description | ||
| isTest : Boolean [read-only]
| Description | ||
| testCount : int [read-only]
| Description | ||
| TEST_MECHANISM : Description [static]
Global instance of a failed test description for test mechanmism reasons
| Description | ||
| Method | Defined By | ||
|---|---|---|---|
Description(displayName:String, metadata:Array, isInstance:Boolean = false)
Constructor. | Description | ||
addChild(description:IDescription):void
Adds an IDescription as a child of the receiver. | Description | ||
Returns a copy of this description, with no children (on the assumption that some of the
children will be added back). | Description | ||
createSuiteDescription(suiteClassOrName:*, metaData:Array = null):IDescription [static]
Creates an IDescription named name. | Description | ||
createTestDescription(testClassOrInstance:Class, name:String, metadata:Array = null):IDescription [static]
Creates a Description of a single test named name in the class testClassOrDescription. | Description | ||
equals(obj:Object):Boolean
Determines if the current description is equal to the provided obj. | Description | ||
getAllMetadata():Array
Returns all of the metadata that is attached to this description node. | Description | ||
| children | property |
children:Array [read-only]
public function get children():Array| displayName | property |
displayName:String [read-only]
public function get displayName():String| EMPTY | property |
public static var EMPTY:DescriptionGlobal instance of an empty test description which can be returned
| isEmpty | property |
isEmpty:Boolean [read-only]
public function get isEmpty():Boolean| isInstance | property |
isInstance:Boolean [read-only]
public function get isInstance():Boolean| isSuite | property |
isSuite:Boolean [read-only]
public function get isSuite():Boolean| isTest | property |
isTest:Boolean [read-only]
public function get isTest():Boolean| TEST_MECHANISM | property |
public static var TEST_MECHANISM:DescriptionGlobal instance of a failed test description for test mechanmism reasons
| testCount | property |
testCount:int [read-only]
public function get testCount():int| Description | () | Constructor |
public function Description(displayName:String, metadata:Array, isInstance:Boolean = false)Constructor.
ParametersdisplayName:String — The display name of the description node.
| |
metadata:Array — The metadata of the description node.
| |
isInstance:Boolean (default = false) — A Boolean value indicating whether the descrption node is an instance.
|
| addChild | () | method |
public function addChild(description:IDescription):void
Adds an IDescription as a child of the receiver.
Parameters
description:IDescription — the soon-to-be child.
|
| childlessCopy | () | method |
public function childlessCopy():IDescriptionReturns a copy of this description, with no children (on the assumption that some of the children will be added back).
ReturnsIDescription — a copy of this description, with no children (on the assumption that some of the
children will be added back).
|
| createSuiteDescription | () | method |
public static function createSuiteDescription(suiteClassOrName:*, metaData:Array = null):IDescription
Creates an IDescription named name.
Generally, you will add children to this IDescription.
Parameters
suiteClassOrName:* — The class of the object to be described or the name of
the class to be subscribed.
| |
metaData:Array (default = null) — Metadata about the test.
|
IDescription — an IDescription named name.
|
| createTestDescription | () | method |
public static function createTestDescription(testClassOrInstance:Class, name:String, metadata:Array = null):IDescription
Creates a Description of a single test named name in the class testClassOrDescription.
Generally, this will be a leaf IDescription.
Parameters
testClassOrInstance:Class — The class of the test.
| |
name:String — The name of the test.
| |
metadata:Array (default = null) — Metadata about the test.
|
IDescription — an IDescription named name.
|
| equals | () | method |
public function equals(obj:Object):Boolean
Determines if the current description is equal to the provided obj.
Parameters
obj:Object — The object to check against the current description.
|
Boolean — true if this is a description of a Runner that runs no tests
|
| getAllMetadata | () | method |
public function getAllMetadata():ArrayReturns all of the metadata that is attached to this description node.
ReturnsArray — the metadata as XML that is attached to this description node,
or null if none exists
|