I've worked out what the problem is here and thought I'd post in case anyone
else had this problem.

In this test testClassA sets up the test suite and has the functions that
are called by the test runner.

Within these functions testClassB functions are called. It is within
testClassB that I was using addAsync.

I have now added a parameter of testClassB: parentTest:TestCase and when I
use addAsync in testclassB I use parentTest.addAsync.

It now all works as expected.

Giles

On Wed, Apr 9, 2008 at 1:49 PM, Giles Roadnight <[EMAIL PROTECTED]>
wrote:

> Hi All
>
> I'm using flexUnit to test code on the project I am currently working on.
>
> I am using addAsync to wait for an event to be fired before continuing
> with the test but it doesnt' seem to work.
>
> The following code works fine:
>
>
> _chartDelegate.viewState.addEventListener(ReportViewStateEvent.DIMENSION_SWITCHED,dimensionSwitched,false,0,true);
>
> but the following code doesn't:
>
>
> _chartDelegate.viewState.addEventListener(ReportViewStateEvent.DIMENSION_SWITCHED,addAsync(dimensionSwitched,1000),false,0,true);
>
> dimensionSwitched does not fire and I do not get a timeout message in the
> test runner.
>
> Any idea what I am doing wrong here?
>
> Thanks
>
> --
> Giles Roadnight
> http://giles.roadnight.name




-- 
Giles Roadnight
http://giles.roadnight.name

Reply via email to