Permalink
Browse files

Added AirRunner as a base class that extends WindowedApplication for …

…testing classes that use the Air api.

N.B. This may not be strictly necessary.
  • Loading branch information...
1 parent 666534d commit 2f1907a0851bbd27a9b340d3a21dcec2b3f34489 Ian Tyrrell committed Nov 6, 2008
Showing with 24 additions and 0 deletions.
  1. +24 −0 framework/as3/asunit/textui/AirRunner.as
@@ -0,0 +1,24 @@
+package asunit.textui {
+ import asunit.framework.TestResult;
+
+ import mx.core.WindowedApplication;
+
+ /**
+ * @author Ian
+ */
+ public class AirRunner extends WindowedApplication {
+
+ protected var runner:TestRunner;
+
+ override protected function createChildren():void {
+ super.createChildren();
+ runner = new FlexTestRunner();
+ rawChildren.addChild(runner);
+ }
+
+ public function start(testCase:Class, testMethod:String = null, showTrace:Boolean = false) : TestResult {
+ return runner.start(testCase, testMethod, showTrace);
+ }
+
+ }
+}

0 comments on commit 2f1907a

Please sign in to comment.