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

Package | org.flexunit.runners.model
Class | public class FrameworkMethod
Inheritance | FrameworkMethod Object
Subclasses | ParameterizedMethod

Represents a method on a test class to be invoked at the appropriate point in test execution. These methods are usually marked with an annotation (such as `Test`, `Before`, `After`, `BeforeClass`, `AfterClass`, etc.).

Public Properties

| Property | Defined By
--- | --- | ---
|  | isAsync : Boolean [read-only] | FrameworkMethod
|  | metadata : Array [read-only] Returns the method's metadata. | FrameworkMethod
|  | method : Method [read-only] Returns the underlying method. | FrameworkMethod
|  | name : String [read-only] Returns the method's name. | FrameworkMethod

Public Methods

| Method | Defined By
--- | --- | ---
|  | FrameworkMethod(method:Method) Construcotr. | FrameworkMethod
|  | applyExplosively(target:Object, params:Array):void Calls the method with the provided set of params for the target class. | FrameworkMethod
|  | getSpecificMetaDataArgValue(metaDataTag:String, key:String):String Returns a metadata argument string based on whether the method's metadata has a matching metaDataTag and key. | FrameworkMethod
|  | hasMetaData(metaDataTag:String):Boolean Determine if the method has metadata for a specific metaDataTag. | FrameworkMethod
|  | invokeExplosively(target:Object, ... params):Object Calls the method with the provided set of params for the target class. | FrameworkMethod
|  | invokeExplosivelyAsync1(parentToken:AsyncTestToken, target:Object, ... params):void Returns the result of invoking this method on target with parameters params. | FrameworkMethod
|  | producesType(type:Class):Boolean Returns a Boolean value indicating whether the method has no parameters and whether the method has a return type that matches the provided type. | FrameworkMethod
|  | validatePublicVoid(isStatic:Boolean, errors:Array):void Adds to errors if this method: is not public, or returns something other than void, or is static (given isStatic is false), or is not static (given isStatic is true). | FrameworkMethod
|  | validatePublicVoidNoArg(isStatic:Boolean, errors:Array):void Adds to errors if this method: is not public, or takes parameters, or returns something other than void, or is static (given isStatic is false), or is not static (given isStatic is true). | FrameworkMethod

Property Detail

isAsync | property

`isAsync:Boolean` [read-only]

Implementation
`public function get isAsync():Boolean`

metadata | property |

`metadata:Array` [read-only]

Returns the method's metadata.

Implementation
`public function get metadata():Array`

method | property |

`method:Method` [read-only]

Returns the underlying method.

Implementation
`public function get method():Method`

name | property |

`name:String` [read-only]

Returns the method's name.

Implementation
`public function get name():String`
Constructor Detail

FrameworkMethod | () | Constructor

`public function FrameworkMethod(method:Method)`

Construcotr. Returns a new `FrameworkMethod` for a provided`method`.

Parameters

| `method:Method` — The metadata for a particular test method.

Method Detail

applyExplosively | () | method

`public function applyExplosively(target:Object, params:Array):void`

Calls the method with the provided set of `params` for the `target` class.

Parameters

| `target:Object` — The class that contains the method.
| `params:Array` — The parameters to be supplied to the method.

getSpecificMetaDataArgValue | () | method |

`public function getSpecificMetaDataArgValue(metaDataTag:String, key:String):String`

Returns a metadata argument string based on whether the method's metadata has a matching `metaDataTag` and `key`.

Parameters

| `metaDataTag:String` — The metadata tag to search for in the method's metadata.
| `key:String` — The key to find a specific atrribute argument in the `metaDataTag`.

Returns

| `String` — the specific String if the `metaDataTag` and `key` exist, a value of 'true' if there is an argument that has a value that matches the `key`, or an empty or null String if the key is not found for the given `metaDataTag`.

hasMetaData | () | method |

`public function hasMetaData(metaDataTag:String):Boolean`

Determine if the method has metadata for a specific `metaDataTag`.

Parameters

| `metaDataTag:String` — The metadata tag to search for in the method's metadata.

Returns

| `Boolean` — a Boolean value indicating if the method has specific metadata that matches the `metaDataTag`.

invokeExplosively | () | method |

`public function invokeExplosively(target:Object, ... params):Object`

Calls the method with the provided set of `params` for the `target` class.

Parameters

| `target:Object` — The `AsyncTestToken` to be notified when the method has been run.
| `... params` — The class that contains the method.

Returns

| `Object`

invokeExplosivelyAsync1 | () | method |

`public function invokeExplosivelyAsync1(parentToken:AsyncTestToken, target:Object, ... params):void`

Returns the result of invoking this method on `target` with parameters `params`. `InvocationTargetException`s thrown are unwrapped, and their causes rethrown.

Parameters

| `parentToken:AsyncTestToken` — The `AsyncTestToken` to be notified when the method has been run.
| `target:Object` — The class that contains the method.
| `... params` — The parameters to be supplied to the method.

producesType | () | method |

`public function producesType(type:Class):Boolean`

Returns a Boolean value indicating whether the method has no parameters and whether the method has a return type that matches the provided `type`.

Parameters

| `type:Class` — The return type to check for in the method.

Returns

| `Boolean`

validatePublicVoid | () | method |

`public function validatePublicVoid(isStatic:Boolean, errors:Array):void`

Adds to `errors` if this method:

- is not public, or
- returns something other than void, or
- is static (given `isStatic` is `false`), or
- is not static (given `isStatic` is `true`).

Parameters

| `isStatic:Boolean` — A Boolean value indicating whether it is acceptable that the method is a static method.
| `errors:Array` — An array of errors that will potential have the current method added if the method does not fufill the proper criteria.

validatePublicVoidNoArg | () | method |

`public function validatePublicVoidNoArg(isStatic:Boolean, errors:Array):void`

Adds to `errors` if this method:

- is not public, or
- takes parameters, or
- returns something other than void, or
- is static (given `isStatic` is `false`), or
- is not static (given `isStatic` is `true`).

Parameters

| `isStatic:Boolean` — A Boolean value indicating whether it is acceptable that the method is a static method.
| `errors:Array` — An array of errors that will potential have the current method added if the method does not fufill the proper criteria.

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