I have a custom TestRunner.mxml that I use to run tests in Eclipse
with.  The test passes in that.  Is there a way I can tell flexmojos
to use that instead of creating its own TestRunner.swf on the fly?

On Thu, May 20, 2010 at 2:16 PM, Marvin Froeder <[email protected]> wrote:
> Or you declare  [ResourceBundle("bundleName")] onto a custom test runner or
> into you Test class.
>
> VELO
>
> On Thu, May 20, 2010 at 3:06 PM, Davis Ford <[email protected]>
> wrote:
>>
>> 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/
>
> --
> 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/
>



-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

-- 
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