I meant, It looks like it uses the first addAssertHandler in both cases. Frédéric THOMAS
> From: [email protected] > To: [email protected] > Subject: [FlexUnit] More than 1 SequenceRunner.addAssertHandler ? > Date: Thu, 19 Jun 2014 16:18:27 +0100 > > Hi, > > I'm trying to use the SequenceRunner for the first time and facing a problem, > it seems I can't have more than one addAssertHandler by SequenceRunner: > > It looks like it uses the last addAssertHandler in both cases. > > [Test(async, description="Verify the Thread State sequence > New->Running->Terminated")] > public function testNewToRunningToTerminate():void { > testStateNew(); > > const runner:SequenceRunner = new SequenceRunner(this); > > runner.addStep(new SequenceCaller(_thread, _thread.start)); > runner.addStep(new SequenceWaiter(_thread, > ThreadStateEvent.THREAD_STATE, 2000)); > > // If I comment this one, everything works as expected. > runner.addAssertHandler(thread_stateRunning, null); > > runner.addStep(new SequenceWaiter(_thread, ThreadResultEvent.RESULT, > 2000)); > > runner.addStep(new SequenceCaller(_thread, _thread.terminate)); > runner.addStep(new SequenceWaiter(_thread, > ThreadStateEvent.THREAD_STATE, 2000)); > runner.addAssertHandler(thread_stateTerminate, null); > > runner.run(); > } > > private function thread_stateRunning(e:ThreadStateEvent, > passThroughData:Object = null):void { > testStateRunning(); > } > > private function thread_stateTerminate(e:ThreadStateEvent, > passThroughData:Object = null):void { > testStateTerminated(); > } > > What did I miss ? > How can I manage that ? > > Frédéric THOMAS
