Providing a reference to the Stage in a Pure AS3 Environment
Hi All,
I'm having real problems trying to get a reference to the Stage in FlexUnit 4.1 TestCases. I am using the FlexUnit Ant Tasks to generate the TestRunner.mxml file which I have modified to bootstrap the VisualTestEnvironmentBuilder like so:
VisualTestEnvironmentBuilder.getInstance(stage);
However, when FlexUnit tries to run each testcase, I get the following stacktrace:
<testcase classname="com.moshigames.api::TestContentAPIImpl" name="loadFails_completeCallbackCalled" time="5" status="error"><error message="Error #1034: Type Coercion failed: cannot convert org.fluint.uiImpersonation.actionScript::ActionScriptVisualTestEnvironment@5671191 to mx.core.IUIComponent." type="com.moshigames.api::TestContentAPIImpl.loadFails_completeCallbackCalled" ><