Defining the CompanyDao test case

Each CompanyDao method should have at least one test method defined. We will include exactly one test method per implemented CompanyDao method. In enterprise applications, we would expect many more scenarios to be covered than the ones identified in the code snippet that follows.

We have also included minimum logging, just enough to split the output when running the test cases. You may wish to add more logging to help analyze the results. The test code assumes that the ttt_company table has appropriate data. In Chapter 2, The Task Time Tracker Database, we added three rows so that we know there is data available. Additional checks would need to be done if we do not have a database with consistent testing data. ...

Get Enterprise Application Development with Ext JS and Spring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.