It seems that most XUnit testing frameworks provide assertions for the times when you want to assert that a given operation will thrown an exception (or an Error in AS3 parlance.) Is there some "standard" way of doing this that I am overlooking, which would explain the absence of an assertError() assertion included with FlexUnit?
I know HOW to implement such a thing, and I will probably add it to my FlexUnit (go open source!), but it seems like such a glaring omission that I'm left wondering if I'm just doing it wrong.
Anyone have thoughts on this?
Edit 05/02/2010: I'd now recommend using FlexUnit 4. It uses an extensible metdata system, supports expected exceptions, and also supports running in an integration server environment without the use of AIR.
Edit: You should have a look at fluint, which was built by people who had enough of FlexUnit and it's limitations. It might have some of these types of assertions built in.
I totally agree. In fact, FlexUnit is missing several useful methods (assertEvent, assertArrayEquals, etc). I know you said you know how to implement it, but feel free to use mine: