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

Package | org.flexunit.internals.builders
Class | public class AllDefaultPossibilitiesBuilder
Inheritance | AllDefaultPossibilitiesBuilder RunnerBuilderBase Object
Subclasses | OnlyRecognizedTestClassBuilder

The `AllDeafultPossibilitiesBuilder` is used to determine what type of `IRunner` can be used to run a specific testClass. The correct `IRunner` for each testClass is found using builders. Each testClass will be compared against an array of `IRunnerBuilders`. The `IRunner` used by the testClass is the first `IRunner` that can successfully be built by one of the builders. The order in which the builder's are checked is as follows:

- IgnoreBuilder
- MetaDataBuilder
- SuiteMethodBuiler
- FlexUnit1Builder
- Fluint1Builder
- FlexUnit4Builder

See also

org.flexunit.internals.builders.IgnoreBuilder
org.flexunit.internals.builders.MetaDataBuilder
org.flexunit.internals.builders.SuiteMethodBuiler
org.flexunit.internals.builders.FlexUnit1Builder
org.flexunit.internals.builders.Fluint1Builder
org.flexunit.internals.builders.FlexUnit4Builder

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | AllDefaultPossibilitiesBuilder(canUseSuiteMethod:Boolean = true) Constructor. | AllDefaultPossibilitiesBuilder
|  | canHandleClass(testClass:Class):Boolean Returns a boolean value indicating if this builder will be able to handle the testClass or not | RunnerBuilderBase
|  | runnerForClass(testClass:Class):IRunner [override] Returns an IRunner that can be used by the provided testClass. | AllDefaultPossibilitiesBuilder
|  | runners(parent:Class, children:Array):Array Constructs and returns a list of IRunners, one for each child class in children. | RunnerBuilderBase
|  | safeRunnerForClass(testClass:Class):IRunner Returns an IRunner that can safely run the provided testClass. | RunnerBuilderBase

Protected Methods

| Method | Defined By
--- | --- | ---
|  | buildBuilders():Array Builds the default set of builders. | AllDefaultPossibilitiesBuilder
|  | flexUnit1Builder():FlexUnit1Builder Returns a FlexUnit1Builder. | AllDefaultPossibilitiesBuilder
|  | flexUnit4Builder():FlexUnit4Builder Returns a FlexUnit4Builder. | AllDefaultPossibilitiesBuilder
|  | fluint1Builder():IRunnerBuilder If Flex classes are compiled into the swc, returns a Fluint1Builder; otherwise, returns a NullBuilder. | AllDefaultPossibilitiesBuilder
|  | ignoredBuilder():IgnoredBuilder Returns an IgnoredBuilder. | AllDefaultPossibilitiesBuilder
|  | metaDataBuilder():MetaDataBuilder Returns a MetaDataBuilder. | AllDefaultPossibilitiesBuilder
|  | suiteMethodBuilder():IRunnerBuilder If suite methods can be used, returns a SuiteMethodBuilder; otherwise, returns a NullBuilder. | AllDefaultPossibilitiesBuilder

Constructor Detail

AllDefaultPossibilitiesBuilder | () | Constructor

`public function AllDefaultPossibilitiesBuilder(canUseSuiteMethod:Boolean = true)`

Constructor.

Parameters

| `canUseSuiteMethod:Boolean` (default = `true`)`` — A Boolean value indicating whether a `SuiteMethodBuilder` can be used.

Method Detail

buildBuilders | () | method

`protected function buildBuilders():Array`

Builds the default set of builders. This determins the order and priority of possible test runners in the system

Returns

| `Array` — An array of IRunnerBuilder objects

flexUnit1Builder | () | method |

`protected function flexUnit1Builder():FlexUnit1Builder`

Returns a `FlexUnit1Builder`.

Returns

| `FlexUnit1Builder`

flexUnit4Builder | () | method |

`protected function flexUnit4Builder():FlexUnit4Builder`

Returns a `FlexUnit4Builder`.

Returns

| `FlexUnit4Builder`

fluint1Builder | () | method |

`protected function fluint1Builder():IRunnerBuilder`

If Flex classes are compiled into the swc, returns a `Fluint1Builder`; otherwise, returns a `NullBuilder`.

Returns

| `IRunnerBuilder`

ignoredBuilder | () | method |

`protected function ignoredBuilder():IgnoredBuilder`

Returns an `IgnoredBuilder`.

Returns

| `IgnoredBuilder`

metaDataBuilder | () | method |

`protected function metaDataBuilder():MetaDataBuilder`

Returns a `MetaDataBuilder`.

Returns

| `MetaDataBuilder`

runnerForClass | () | method |

`override public function runnerForClass(testClass:Class):IRunner`

Returns an `IRunner` that can be used by the provided `testClass`. The `testClass` will be compared against builders until a suitable runner is determined. The order in which the builder's are checked is as follows:

- IgnoreBuilder
- MetaDataBuilder
- SuiteMethodBuiler
- FlexUnit1Builder
- Fluint1Builder
- FlexUnit4Builder

Parameters

| `testClass:Class` — The test class that needs a runner.

Returns

| `IRunner` — a runner that can run the `testClass`; a value of `null` will be returned if no suitable runner is found.

suiteMethodBuilder | () | method |

`protected function suiteMethodBuilder():IRunnerBuilder`

If suite methods can be used, returns a `SuiteMethodBuilder`; otherwise, returns a `NullBuilder`.

Returns

| `IRunnerBuilder`

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