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

Package | org.flexunit.runner.manipulation
Class | public class OrderArgumentPlusInheritanceSorter
Inheritance | OrderArgumentPlusInheritanceSorter Object
Implements | ISorter, IFixtureSorter

A `MetadataSorter` compares two values to determine which value is greater. This particular sorter also looks at class inheritance depth to group ordering by parent and subclass

Public Properties

| Property | Defined By
--- | --- | ---
|  | DEFAULT_SORTER : ISorter [static] ORDER_ARG_INHERITANCE_SORTER is an ISorter and IFixtureSorter which can sort methods by their order and fixture elements by order and inheritance | OrderArgumentPlusInheritanceSorter

Public Methods

| Method | Defined By
--- | --- | ---
|  | OrderArgumentPlusInheritanceSorter(existingSorter:ISorter) Constructor | OrderArgumentPlusInheritanceSorter
|  | apply(object:Object):void Sorts the test in runner using compare function. | OrderArgumentPlusInheritanceSorter
|  | compare(o1:IDescription, o2:IDescription):int Compares its two arguments for order. | OrderArgumentPlusInheritanceSorter
|  | compareFixtureElements(o1:IDescription, o2:IDescription, cache:ISortingInheritanceCache, superFirst:Boolean = true):int Compares its two arguments for order. | OrderArgumentPlusInheritanceSorter

Property Detail

DEFAULT_SORTER | property

`public static var DEFAULT_SORTER:ISorter`

ORDER_ARG_INHERITANCE_SORTER is an `ISorter` and `IFixtureSorter` which can sort methods by their order and fixture elements by order and inheritance

Constructor Detail

OrderArgumentPlusInheritanceSorter | () | Constructor

`public function OrderArgumentPlusInheritanceSorter(existingSorter:ISorter)`

Constructor

Parameters

| `existingSorter:ISorter` — existing order sorting class

Method Detail

apply | () | method

`public function apply(object:Object):void`

Sorts the test in `runner` using `compare function`.

Parameters

| `object:Object`

compare | () | method |

`public function compare(o1:IDescription, o2:IDescription):int`

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. If the two objects are of equal order number, then we are simply going to return them in alphabetical order.. This method also takes into account the order of the found objects in terms of their super and sub classes

Parameters

| `o1:IDescription` — `IDescription` the first object to be compared.
| `o2:IDescription` — `IDescription` the second object to be compared.

Returns

| `int`

compareFixtureElements | () | method |

`public function compareFixtureElements(o1:IDescription, o2:IDescription, cache:ISortingInheritanceCache, superFirst:Boolean = true):int`

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Parameters

| `o1:IDescription` — `IDescription` the first object to be compared.
| `o2:IDescription` — `IDescription` the second object to be compared.
| `cache:ISortingInheritanceCache`
| `superFirst:Boolean` (default = `true`)``

Returns

| `int` — a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

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