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

Testing a service that returns an AsyncToken

$
0
0

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.

 

    [Test(async)]

 

        public function testAttemptLogin():void

 

        {

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

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

 

        }

 

 

 

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

//assertions

            }


Viewing all articles
Browse latest Browse all 25673

Trending Articles



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