Re: unit testing Cayenne objects

From: Cris Daniluk (cris.danilu..mail.com)
Date: Tue May 03 2005 - 11:29:53 EDT

  • Next message: Erik Hatcher: "Re: unit testing Cayenne objects"

    > No question... but what if I only need one piece of data? DBUnit
    > would be overkill :)
    >
    > I'm pragmatic like that. I'll jam in DBUnit soon though - it seems
    > to be the best way to go at this point.
    >

    I tend to agree with Mike - when it comes to true unit tests, I really
    like to avoid the database as much as possible. Where I really involve
    the database is in functional testing, and so big datasets are the
    norm.

    Pragmatically (or lazily), though, I do end up unit testing some stuff
    on the db to avoid a sea of mock objects, etc etc. So, I suppose I
    can't at all disagree with you that if you only need a few pieces of
    data, dbUnit is a big waste!

    > Excellent!
    >
    > I'm a big proponent of Test Driven Learning - writing unit tests to
    > get a feel for how a framework or API works. Almost all the examples
    > we wrote for Lucene in Action (get the source code at
    > www.lucenebook.com) are JUnit tests that assert features of Lucene
    > itself.
    >

    I wish more projects offered the sort of tests you describe, as they
    speak volumes more than any documentation ever could. Tapestry for
    example... cough cough :)

    Cris



    This archive was generated by hypermail 2.0.0 : Tue May 03 2005 - 11:29:55 EDT