I have a UI FlexUnit4 test kind of like this:

[BeforeClass]
public static function beforeClass():void {
        ResourceManager.getInstance().localeChain=["en_US"];
}
                
[Before(async,ui)]
public function setUp():void {
        _renderer = new MyRenderer();
        Async.proceedOnEvent(this, _renderer, FlexEvent.CREATION_COMPLETE);
        UIImpersonator.addChild(_renderer);
}

[After(ui)]
public function tearDown():void {
        UIImpersonator.removeChild(_renderer);
        _renderer = null;
}
                
[Test]
public function verifyToolTipForExecInfo():void {
    etc...
}


The code that the test case tests ends up calling the ResourceManager
itself to get a string:

// code under test does this
var s:String = ResourceManager.getInstance().getString("bundleName", "key");

When I run this test inside Eclipse in my own TestRunner.mxml
application with the resource bundle metadata it works fine:

<mx:Metadata>
        [ResourceBundle("bundleName")]
</mx:Metadata>

This file is located at src/main/resources/locales/en_US/bundleName.properties

The test passes fine for me...but when I run it as:

$ mvn clean test

It fails because the string returned from getString() is always null,
and I'm not sure why.  Anyone have any clue / pointers on how to
resolve this ?

Thanks in advance,
Davis

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos

http://flexmojos.sonatype.org/

Reply via email to