|
From: Keith P. <kp...@bi...> - 2005-06-14 12:16:45
|
> -----Original Message-----
> From: asu...@li...
> [mailto:asu...@li...] On Behalf
> Of Luke Bayes
> Just caught this on the osflash list and wanted to make sure
> we had 'em here too!
>
I just updated these to use built in eclipse variables for package and type.
Now it fills in almost everything for you.
AllTests:
=========
import com.asunit.framework.*;
class AllTests extends TestSuite {
private var className:String = "AllTests";
public function AllTests()
{
super();
addTest(new ${enclosing_package}.${package}.AllTests());
// and/or add specific tests here
}
}
TestCase:
=========
import ${enclosing_package}.*;
import com.asunit.framework.*;
class ${enclosing_package_and_type} extends TestCase {
private var className:String = "${enclosing_package_and_type}";
private var instance:${enclosing_type};
public function setUp():Void {
instance = new ${enclosing_type}();
}
public function tearDown():Void {
delete instance;
}
public function testInstantiated():Void {
assertTrue("${enclosing_type} instantiated", instance
instanceof ${enclosing_type});
}
}
|