Answered
Suggestion: package-level assert functions for less typing in FlexUnit 4
AS3 doesn't have static method imports as nice as Java 5, but we can do much the same thing with package-level functions.We could use these to cut down on the amount of typing necessary in FlexUnit 4.
I added this to my fork of AsUnit:
http://github.com/robertpenner/asunit/commit/bdb293436491792625ddc1f637c81c723986b87d
Example:
package asunit.asserts {
import asunit.framework.Assert;
public const assertEquals:Function = Assert.assertEquals;
}
In the test case, this would be used like so:
import asunit.asserts.*;
...
// in test method
assertEquals(...
