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

BeforeClass(async) handler assertion

$
0
0
package
{    import flash.events.TimerEvent;    import flash.utils.Timer;    import org.flexunit.Assert;    import org.flexunit.async.Async;    public class SomeTestCase    {        [BeforeClass(async)]        public static function startTimer():void        {            const timer:Timer = new Timer(100, 1);            Async.handleEvent(SomeTestCase, timer, TimerEvent.TIMER_COMPLETE, handleTimerComplete);            timer.start();        }        private static function handleTimerComplete():void        {            Assert.assertTrue(false);        }        [Test]        public function someTest():void        {        }    }
}

 

 

Assertion in handleTimerComplete will not fail. Is it a bug?

flexunit-4.1.0-8-flex_4.1.0.16076


Viewing all articles
Browse latest Browse all 25673

Trending Articles



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