diff bindings/as3/ext/asunit/textui/FlexRunner.as @ 732:3a0b9700b3d2

* Initial AS3 commit
author mas01mj
date Tue, 14 Sep 2010 16:47:10 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bindings/as3/ext/asunit/textui/FlexRunner.as	Tue Sep 14 16:47:10 2010 +0000
@@ -0,0 +1,25 @@
+package asunit.textui {
+    import asunit.framework.TestResult;
+    
+    import mx.core.Application;
+    
+    /**
+    *   The <code>FlexTestRunner</code> should be the base class for your 
+    *   test harness if you're testing a project that uses Flex components.
+    *   
+    *   @includeExample FlexRunnerExample.mxml
+    **/
+    public class FlexRunner extends Application {
+        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);
+        }
+    }
+}