Hi
I am trying to write a test for my web service. I’m using flexunit and have
implemented my service using https://github.com/jonnyreeves/as3-async/.
How do you continue the test without any events triggered? What would be best
practice in this case?
[Test(async, timeout="1000")]
public function testRealBackend(member) : void {
// TODO
member.should().have.property(’token’);
}
[Before(async)]
public function setUp():void {
AuthenticateService.login(‘username', ‘password')
.completes(function(member:MemberModel) {
//Continue with tests
})
.fails(function(e:Error) {
throw new Error('Authentication backend not responding: ‘ +
e.message);
});
}
Venlig hilsen/Best regards
Jesper Birkestrøm