Skip to content

Instantly share code, notes, and snippets.

@newtriks
Created June 10, 2011 15:35
Show Gist options
  • Save newtriks/1019067 to your computer and use it in GitHub Desktop.
Save newtriks/1019067 to your computer and use it in GitHub Desktop.
Flex ASUnit4 TestRunner
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
minWidth="800"
minHeight="600"
creationComplete="creationCompleteHandler(event)">
<fx:Script>
<![CDATA[
import asunit.core.TextCore;
import mx.core.UIComponent;
import mx.events.FlexEvent;
private var core:TextCore;
private function creationCompleteHandler(event:FlexEvent):void
{
// Flex 4 complains when we use UIComponent from MXML... Boo.
var visualContext:UIComponent=new UIComponent();
addElement(visualContext);
core=new TextCore();
core.start(AllTests, null, visualContext);
}
]]>
</fx:Script>
</s:Application>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment