Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Test(async)]
- public function userLogin_badCredentials_FailedLogin():void {
- var username:String = "guest";
- var password:String = "not_the_right_password";
- var token:AsyncToken = authenticationService.userLogin(username, password);
- token.addResponder(Async.asyncResponder(this, new TestResponder(handleRemoteObjectNoExpectedResult, handleRemoteObjectExpectedFaultBadCredentials), TIMEOUT, username, handleTestTimeout));
- }
- [Test(async)]
- public function userLoginLogout_UserLoggedIn_SuccessfulLoginLogout():void {
- var username:String = "admin";
- var password:String = "admin";
- var token:AsyncToken = authenticationService.userLogin(username, password);;
- token.addResponder(Async.asyncResponder(this, new TestResponder(userLoginLogout2_UserLoggedIn_SuccessfulLoginLogout, handleUnexpectedFault), TIMEOUT, username, handleTestTimeout));
- }
- public function userLoginLogout2_UserLoggedIn_SuccessfulLoginLogout(event:ResultEvent, passThroughData:Object):void {
- // Must have logged in correctly
- assertTrue(serviceManager.channelSet.authenticated);
- // Now lets test logout
- var token:AsyncToken = authenticationService.userLogout();
- token.addResponder(Async.asyncResponder(this, new TestResponder(handleExpectedResult, handleUnexpectedFault), TIMEOUT, null, handleTestTimeout));
- }
- Channel.Ping.Failed error Detected duplicate HTTP-based FlexSessions, generally
- due to the remote host disabling session cookies. Session cookies must be enabled
- to manage the client connection correctly.
Add Comment
Please, Sign In to add comment