| Package | org.flexunit.runner |
| Class | public class Request |
| Inheritance | Request Object |
| Implements | IRequest |
| Subclasses | ClassRequest, FilterRequest, QualifyingRequest, SortingRequest |
Request is an abstract description of tests to be run. It represents an object that
wraps tests when they are presented to the FlexUnitCore. Requests can be
filtered and sorted to control the subset and order of tests to be executed.
The following static methods can be used to create requests:
#aClass()
#classes()
#runner()
#method()
The key property of the Request that the FlexUnitCore needs is the
IRunner. The IRunner is an interface implemented by any object
capable of executing a specific type of test.
The flow when FlexUnit4 runs tests is that a Request specifies some tests to be run.
The IRunner is created for each class implied by the Request. The
IRunner provides a detailed IDescription of the class which is a tree
structure of the tests to be run.
| Property | Defined By | ||
|---|---|---|---|
| iRunner : IRunner [read-only]
Returns an IRunner for this Request. | Request | ||
| sort : ISort
Returns an ISort for this Request. | Request | ||
| Method | Defined By | ||
|---|---|---|---|
Request()
Constructor. | Request | ||
[static]
Create a Request that, when processed, will run all the tests
in a class. | Request | ||
[static]
Create a Request that, when processed, will run all the tests
in a set of classes. | Request | ||
filterWith(filterOrDescription:*):Request
Returns a Request that either filters based on a Description or a Filter. | Request | ||
Deprecated: Use the iRunner property instead | Request | ||
[static]
Create a Request that, when processed, will run a single test. | Request | ||
[static] | Request | ||
qualifyClasses(... argumentsArray):Request [static] | Request | ||
[static]
| Request | ||
| Request | |||
| Method | Defined By | ||
|---|---|---|---|
Returns a Request that only runs contains tests whose Description
equals desiredDescription. | Request | ||
Returns a Request that only contains those tests that should run when
a filter is applied. | Request | ||
| _runner | property |
classInternal var _runner:IRunner
The IRunner for this Request.
| iRunner | property |
iRunner:IRunner [read-only]
Returns an IRunner for this Request.
public function get iRunner():IRunner| sort | property |
sort:ISort
Returns an ISort for this Request.
public function get sort():ISort public function set sort(value:ISort):void| Request | () | Constructor |
public function Request()Constructor.
| aClass | () | method |
public static function aClass(clazz:Class):Request
Create a Request that, when processed, will run all the tests
in a class. The odd name is necessary because class is a reserved word.
Parameters
clazz:Class — the class containing the tests.
|
Request — a Request that will cause all tests in the class to be run.
|
| classes | () | method |
public static function classes(... argumentsArray):Request
Create a Request that, when processed, will run all the tests
in a set of classes.
Parameters
... argumentsArray — the classes containing the tests.
|
Request — a Request that will cause all tests in the classes to be run.
|
| filterWith | () | method |
public function filterWith(filterOrDescription:*):Request
Returns a Request that either filters based on a Description or a Filter.
Parameters
filterOrDescription:* — The Filter or Description to apply to this Request.
|
Request — the filtered Request.
|
| filterWithDescription | () | method |
protected function filterWithDescription(desiredDescription:IDescription):Request
Returns a Request that only runs contains tests whose Description
equals desiredDescription.
Parameters
desiredDescription:IDescription — An IDescription of those tests that should be run.
|
Request — the filtered Request.
|
| filterWithFilter | () | method |
protected function filterWithFilter(filter:IFilter):Request
Returns a Request that only contains those tests that should run when
a filter is applied.
Parameters
filter:IFilter — The Filter to apply to this Request.
|
Request — the filtered Request.
|
| getRunner | () | method |
| method | () | method |
public static function method(clazz:Class, methodName:String):Request
Create a Request that, when processed, will run a single test.
This is done by filtering out all other tests. This method is used to support rerunning
single tests.
Parameters
clazz:Class — the class of the test.
| |
methodName:String — the name of the test.
|
Request — a Request that will cause a single test be run.
|
| methods | () | method |
public static function methods(clazz:Class, methodNames:Array):RequestParameters
clazz:Class | |
methodNames:Array |
Request |
| qualifyClasses | () | method |
public static function qualifyClasses(... argumentsArray):RequestParameters
... argumentsArray |
Request |
| runner | () | method |
public static function runner(runner:IRunner):Request
Parameters
runner:IRunner — the IRunner to return.
|
Request — a Request that will run the given runner when invoked.
|
| sortWith | () | method |
public function sortWith(sorterOrComparatorFunction:*):Request
Parameters
sorterOrComparatorFunction:* — is either an ISorted implementation or a comparator function to be used
to define the sort order of the tests in this Request.
|
Request — a Request with ordered Tests.
|