root/air/AirDao/tests/Test.mxml

リビジョン 3332, 1.0 kB (コミッタ: Seacolor, コミット時期: 2 年 前)

テストの作成

Line 
1 <?xml version="1.0" encoding="utf-8"?>
2 <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
3         xmlns:flexUnitUIRunner="http://www.adobe.com/2009/flexUnitUIRunner"
4         width="1024" height="600" creationComplete="creationCompleteHandler(event)">
5         <mx:Script>
6                 <![CDATA[
7                         import mx.events.FlexEvent;
8                         import org.flexunit.listeners.UIListener;
9                         import org.flexunit.runner.FlexUnitCore;
10                        
11                         protected function creationCompleteHandler(event:FlexEvent):void
12                         {
13                                 // FlexUnitCoreインスタンスを作成する
14                                 var core:FlexUnitCore = new FlexUnitCore();
15                                
16                                 // GUI表示させる場合は、専用のリスナーを追加する
17                                 core.addListener(new UIListener(testRunner));
18                                
19                                 // テストを実行するrunメソッドで、引数に作成したテストクラスを指定する
20                                 core.run(TestSuite);
21                         }
22                 ]]>
23         </mx:Script>
24         <flexUnitUIRunner:TestRunnerBase id="testRunner" width="100%" height="100%" /> 
25 </mx:WindowedApplication>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。