Skip navigation
Currently Being Moderated

Testing a service that returns an AsyncToken

Jan 5, 2011 5:01 AM

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

            }

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points