| Package | org.flexunit.runners.model |
| Class | public class RunnerBuilderBase |
| Inheritance | RunnerBuilderBase Object |
| Implements | IRunnerBuilder |
| Subclasses | AllDefaultPossibilitiesBuilder, FlexUnit1Builder, FlexUnit4Builder, IgnoredBuilder, MetaDataBuilder, NullBuilder, SuiteMethodBuilder |
RunnerBuilderBase is used as a base by other runner builders in FlexUnit4. It
provides basic logic for the handling of constructing IRunners for children of a
provided test class. These children in turn may have children that will also need
corresponding IRunners.
The RunnerBuilderBasecontains logic ensuring that a parent class does not reference
itself or that a child class does not reference the parent, preventing a potential infinite loop.
See also
| Method | Defined By | ||
|---|---|---|---|
Constructor. | RunnerBuilderBase | ||
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
Returns an IRunner for a specific testClass. | RunnerBuilderBase | ||
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 | ||
| RunnerBuilderBase | () | Constructor |
public function RunnerBuilderBase()Constructor.
| canHandleClass | () | method |
public function canHandleClass(testClass:Class):BooleanReturns a boolean value indicating if this builder will be able to handle the testClass or not
Parameters
testClass:Class — The class to test to determine an IRunner.
Returns false, forcing any new subclasses of RunnerBuilderBase to override this method.
|
Boolean |
| runnerForClass | () | method |
public function runnerForClass(testClass:Class):IRunner
Returns an IRunner for a specific testClass.
Parameters
testClass:Class — The test class for which to determine an IRunner.
|
IRunner — an IRunner that will run the testClass.
|
| runners | () | method |
public function runners(parent:Class, children:Array):Array
Constructs and returns a list of IRunners, one for each child class in
children. Care is taken to avoid infinite recursion:
this builder will throw an exception if it is requested for another
runner for parent before this call completes.
Parameters
parent:Class — The parent class that contains the children.
| |
children:Array — The child classes for which to find IRunner.
|
Array — a list of IRunners, one for each child class.
|
| safeRunnerForClass | () | method |
public function safeRunnerForClass(testClass:Class):IRunner
Returns an IRunner that can safely run the provided testClass.
If no suitable IRunner can be found, a value of null is returned.
Parameters
testClass:Class — The class to for which to determine an IRunner.
|
IRunner — an IRunner that can run the testClass.
|