Book Image

Mastering Unit Testing Using Mockito and JUnit

By : Sujoy Acharya
Book Image

Mastering Unit Testing Using Mockito and JUnit

By: Sujoy Acharya

Overview of this book

Table of Contents (17 chapters)
Mastering Unit Testing Using Mockito and JUnit
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


This chapter explained the unit testing strategy for the database layer; it provided an example of unit testing in isolation from the database, writing clean JDBC code with Spring, and writing integration tests with database. We also learned about the configured automatic transaction rollback in Spring JDBC integration tests.

You should now be able to unit test the data access layer components in isolation from the database, write neat JDBC code using Spring, and write integration tests using Spring API.

The next chapter covers the service layer and testing legacy code testing.