The previous code is in the creationComplete event function for my test runner. (I used the flexunit 4.1 turnkey example)
The "this" is the runner application.
Then in the test I would have:
[Test]
publicfunction testFunct():void
{
//this class stores various elements so that other classes can referance them
Control.initApp(new Image());
//this fails when testing
Assert.assertNotNull(Control.getImageContainer().stage);
}
I am not sure why the assert equals null.