Chapter 10. Testing and JDBC

This chapter covers

  • Which parts of your JDBC client code not to test
  • Testing your mapping between domain objects and ResultSets
  • Verifying SQL commands with the Gold Master technique
  • Using database meta data to write simpler tests
  • Managing test data in different databases and using DbUnit
  • Testing legacy JDBC code

There are those who would say that the database is the core of any “real” Java application. Although applications need data, many people have designed applications around the database, as though it were the center of the universe. This leads to high coupling between the application and its data sources and, as we have been saying throughout, high coupling and duplication are primary sources of frustration ...

Get JUnit Recipes 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.