API Documentation | All Packages | All Classes | Index | Frames No Frames |
DynamicFilter

Package | org.flexunit.runner.manipulation.filters
Class | public class DynamicFilter
Inheritance | DynamicFilter AbstractFilter Object

The canonical case of filtering is when you want to run a single test method in a class. Rather than introduce runner API just for that one case, FlexUnit provides a general filtering mechanism. If you want to filter the tests to be run, extend `Filter` and apply an instance of your filter to the `org.flexunit.runner.Request` before running it (see `org.flexunit.runner.FlexUnitCore#run(Request)`. //TODO: IRunner is an interface, there is no pre-existing implementing class, does the following //still apply? Is there a RunWith equivalent Alternatively, apply a `Filter` to a org.junit.runner.Runner before running tests (for example, in conjunction with org.junit.runner.RunWith.

See also

org.flexunit.runner.FlexUnitCore.run()

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | DynamicFilter(shouldRunFunction:Function, describeFunction:Function) Constructor | DynamicFilter
|  | apply(child:Object):void Invoke with a org.flexunit.runner.IRunner to cause all tests it intends to run to first be checked with the filter. | AbstractFilter
|  | describe(description:IDescription):String [override] Returns a textual description of this Filter | DynamicFilter
|  | shouldRun(description:IDescription):Boolean [override] | DynamicFilter

Constructor Detail

DynamicFilter | () | Constructor

`public function DynamicFilter(shouldRunFunction:Function, describeFunction:Function)`

Constructor

Parameters

| `shouldRunFunction:Function` — function that determines if a method should run
| `describeFunction:Function` — function that describes a method

Method Detail

describe | () | method

`override public function describe(description:IDescription):String`

Returns a textual description of this Filter

Parameters

| `description:IDescription`

Returns

| `String` — a textual description of this Filter

shouldRun | () | method |

`override public function shouldRun(description:IDescription):Boolean`

Parameters

| `description:IDescription` — the description of the test to be run

Returns

| `Boolean` — `true` if the test should be run

Thu Apr 10 2014, 08:07 AM +10:00