【发布时间】:2011-05-21 14:42:14
【问题描述】:
在使用 PureMVC 的 Flash Builder 4 中运行单元测试时更改默认套件的步骤是什么?
【问题讨论】:
标签: apache-flex unit-testing flash-builder puremvc test-suite
在使用 PureMVC 的 Flash Builder 4 中运行单元测试时更改默认套件的步骤是什么?
【问题讨论】:
标签: apache-flex unit-testing flash-builder puremvc test-suite
当您创建新的测试用例或新的测试套件时,您可以从菜单顶部选择是使用 FlexUnit4 还是 FlexUnit1。我环顾四周,没有看到任何预先选择一个或另一个的方法。
【讨论】:
为了更改或添加测试套件,我必须更改侦听器中的测试套件,以便在应用程序组件的调解器上更改启动事件。
override public function handleNotification( note:INotification ):void
{
switch ( note.getName() )
{
case NotificationConstants.STARTUP_SUCCESS:
flexUnitApplication.testRunner.runWithFlexUnit4Runner(currentRunTestSuite(), "MyTests");
break;
}
}
private function currentRunTestSuite():Array
{
var testsToRun:Array = new Array();
testsToRun.push(MyTestSuite);
return testsToRun;
}
【讨论】: