O'Reilly logo

JUnit Recipes: Practical Methods for Programmer Testing by J B Rainsberger, Scott Stirling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required