Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Testing with JUnit

You're reading from   Testing with JUnit Master high quality software development driven by unit tests

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781782166603
Length 200 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Leonard Przybylski Leonard Przybylski
Author Profile Icon Leonard Przybylski
Leonard Przybylski
Frank Appel Frank Appel
Author Profile Icon Frank Appel
Frank Appel
Arrow right icon
View More author details
Toc

Chapter 3. Developing Independently Testable Units

One of the most difficult parts for JUnit beginners confronted with non-trivial real-world situations is to decompose big requirements into small and independently testable units. At the beginning of this chapter, you're going to learn how requirements can be translated into single responsibility components and how they assemble into a collaborating system.

Next you're going to understand the impact of collaboration dependencies on our testing efforts. Once you're aware of the role of collaborators and how a component under test interacts with them, you'll get to know when it is important to replace them with test doubles.

Continuing our timeline example, we'll look at the use cases and application practices of the various double patterns in depth. After that, you'll learn about the advantages and disadvantages of mock frameworks. You'll also see how to work with generated doubles in practice,...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image