2 Replies Latest reply: Jan 5, 2011 8:18 AM by nikos101 RSS

    Testing a service that returns an AsyncToken

    nikos101 Community Member

      I have a working test that tests a service that returns an AsyncToken. I am using AsyncResponder instead of any of the Aysnc Flexunit stuff. Is this OK?


      One thing I don't get is that the passthroughData get passed to the onResult method, even though AsyncResponder doesn't pass on anything other than the event.




              public function testAttemptLogin():void



            var token: AsyncToken = objectToTest.attemptLogin('k');

           token.addResponder(new AsyncResponder(onResult, faultHandler));






              private function onResult(event:ResultEvent,passthroughData:Object):void {