Quantcast
Channel: Adobe Community : Popular Discussions - FlexUnit
Viewing all articles
Browse latest Browse all 25673

RemoteObject + AsyncToken

$
0
0

Seems that FlexUnit 4 passes a method marked with [Test(async)] even if inside it there is a real call to a RemoteObject using AsyncToken. The code looks like this:

 

[Test(async)]

publicfunction testCreateProject():void

{

     var responder:IResponder = Async.asyncResponder( this,

          new TestResponder( verifyNewProjectResult, verifyNewProjectFault ), 5000 );

     var token:AsyncToken = remoteObject.createProject();

     token.addResponder( responder );

}

 

On the FlexUnit4 framework test cases here http://opensource.adobe.com/svn/opensource/flexunit/branches/4.x/FlexU nit4Test/src/flexUnitTests/flexUnit4/suites/frameworkSuite/cases/TestA synchronous.as

there is a method that used the AsyncToken and TestResponder "testAyncResponderFaultWithTestResponder", but what happens there is not actually async as the result is sent right on the method scope with the token.applyResult. Actually going to the remote object will cause FlexUnit to pass the method as nothing was happening. Or am i missing something ?

 

Thanks in advance,

Adrian.


Viewing all articles
Browse latest Browse all 25673

Trending Articles



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