Testing framework [WAS: Exceptions . . .]

From: Kevin Menard (kmenar..ervprise.com)
Date: Fri Aug 03 2007 - 12:55:18 EDT

  • Next message: Andrus Adamchik: "Re: Testing framework [WAS: Exceptions . . .]"

    > -----Original Message-----
    > From: Andrus Adamchik [mailto:andru..bjectstyle.org]
    > Sent: Friday, August 03, 2007 12:38 PM
    > To: de..ayenne.apache.org
    > Subject: Re: Exceptions . . .

    > For things like argument checking in the user-facing API,
    > IllegalArgumentException seems more appropriate than
    > CayenneRuntimeException.

    Agreed.

    > Also I don't think we have too many methods in Cayenne (if any at
    > all) that throw checked CayenneException, requiring a try/catch. It
    > is always CayenneRuntimeException.

    Yeap. My mistake.

    > It's been the later. But also because everybody wants to cut down
    > time writing unit tests, not because of some principle :-)

    Then I suppose this would raise another topic. JUnit 3 is a bit of a
    boar for testing exception. You basically have to try, catch, fail.
    TestNG has a standard facility for testing for expected exceptions. My
    guess is that JUnit4 does as well, but I have nothing to back that up
    with. There was some discussion some time ago about moving the testing
    framework. Have we hit that crossroad yet, or is that still for a rainy
    day?

    -- 
    Kevin
    



    This archive was generated by hypermail 2.0.0 : Fri Aug 03 2007 - 12:55:48 EDT