JPetStore also has unit tests that hit the database directly.
Clinton
On Wed, Jul 8, 2009 at 12:03 PM, Jeff Butler
<jeffgbutler@...> wrote:
You could look at the Ibatis or Ibator builds - they both unit test with JUnit against a "live" database (hsqldb).
The Ibator build uses generated DAO layer, JUnit, hsqldb - seems like just what you are asking for.
Jeff Butler
On Wed, Jul 8, 2009 at 12:52 PM, David Brown
<dbrown@...> wrote:
Hello Begin, Goodin and Meadors, having read (and reread) the Begin book, and in particular, the ch. 13 Unit testing only seems to cover the use of Mock objects. I don't dispute the need and usefulness of Mock objects but I would like to JUnit test my iBatis/MySql development using a live database. I know this is discussed briefly in the book but I don't see any real-world examples that apply to what I am trying to test. Please reply with links or directives to examples of DAO layer JUnit testing of iBatis against a live database. The most valuable example would test against two tables with references and contraints e.g. primary key auto-generation and a FK reference to the generated key. My current efforts only return test errors (not failures). Regards, David.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@...
For additional commands, e-mail: user-java-help@...