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 legacy code and new development. It covered the legacy code issues, refactored the legacy code, illustrated design for testability, described the TDD concepts and TDD life cycle, demonstrated TDD examples, and refactoring.

Now the reader should be able to write unit tests for legacy code, refactor the legacy code to improve the design of the existing code, and start writing simple, clean, and maintainable code that follows TDD, and refactor the code to improve its quality.

The next chapter covers the best practices of unit testing.