Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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
 Appel Appel
Author Profile Icon Appel
Appel
Arrow right icon
View More author details
Toc

Summary


In this chapter, we've seen how collaborating components have an impact on our ability to write tests that run units shielded from the influences of other parts of a software system. We've learned how to use test doubles to isolate the components from real-world DOCs and hence, keep our tests fast, reliable, and maintainable.

To do so, you've been pointed first to the significance of indirect inputs and outputs. Once you understood this basic interaction principle between SUT and DOC, we went on with an in-depth discussion of the various double patterns available. In this context, you've been told about the intended use of dummy-, fake-, stub, spy, and mock stand-in types. After looking at the possibilities of mock frameworks and questioning their pros and cons, you experienced how generated doubles increase work efficiency in practice.

Finally, you learned about test helpers that, in contrast with doubles, do not collaborate with components under test, but rather decouple the test...

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 £13.99/month. Cancel anytime
Visually different images