drewbourne / mockolate

fake chocolate, mock objects and test spies for AS3
http://mockolate.org/
MIT License
145 stars 27 forks source link

Explicitly define namespaces to proxy #42

Closed drewbourne closed 13 years ago

drewbourne commented 13 years ago

In order to work around the brokenness of the flash.utils.describeType() not reporting final on method, properties, variables, require the user to explicitly define which namespaces they would like to proxy.

Suggested APIs:

1) Raw API, using namespace references.

prepareWithNamespaces(ClassToPrepare, [ flash_proxy, mx_internal ]);

2) Metadata API, using fully qualified namespace names.

[Mock(namespaces="flash.utils.flash_proxy,mx.core.mx_internal")]
public var doodad:ClassToPrepare;
drewbourne commented 13 years ago

Available in master.

The regular API is in flux and will be documented for the next release.

The metadata API supports three forms of specifying the namespaces: