0 Replies Latest reply on Mar 14, 2012 2:49 PM by Flash Runner

    BeforeClass(async) handler assertion

    Flash Runner
      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