I think Angsar sums it up nicely, though Alex makes a point that we shouldn't change the public API until a 2.x release.
Alex Ruiz wrote:
> I see...this is my take:
> 1. We won't break a public API, so returning AssertionError needs
> to stay
> 2. The other 'fail' methods can be changed to return
> AssertionError, and we won't break the API
> 3. FEST-Swing is a user of the API, and by being part of the FEST
> project, makes it a very important use
Hi Alex, hi all,
IMHO, the signatures are lying if we change them all to:
public AssertionError fail(String).
"fail" methods let a test fail by interrupting the normal control flow,
usually by throwing an exception. JUnit does it this way, TestNG does it
this way, for all the assertXxx or fail methods. If the normal control
flow is interrupted, the methods cannot return a value. So claiming the
method returns an AssertionError is plain wrong. It does not. Never.
To me, this kind of signature looks more like a true mistake. And
mistakes should be fixed, even in public APIs.