Dependency is the key problem in software development at all scales.... Eliminating duplication in programs eliminates dependency.
Kent Beck, Test-Driven Development: By Example
This chapter covers
The persistence layer (or, roughly speaking, the database access code) is undoubtedly one of the most important parts of any enterprise project. Despite its importance, the persistence layer is hard to unit test, mainly because of the following issues: