Quantcast
Channel: Adobe Community: Message List - FlexUnit Development
Viewing all articles
Browse latest Browse all 104

Re: flexunit stage null reference

$
0
0

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.


Viewing all articles
Browse latest Browse all 104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>