Packageorg.flexunit.runners.model
Classpublic class FrameworkMethod
InheritanceFrameworkMethod Inheritance 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
 PropertyDefined 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
 MethodDefined By
  
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
isAsyncproperty
isAsync:Boolean  [read-only]


Implementation
    public function get isAsync():Boolean
metadataproperty 
metadata:Array  [read-only]

Returns the method's metadata.


Implementation
    public function get metadata():Array
methodproperty 
method:Method  [read-only]

Returns the underlying method.


Implementation
    public function get method():Method
nameproperty 
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 providedmethod.

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. InvocationTargetExceptions 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:

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:

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.