More than the act of testing, the act of designing tests is one of the best bug preventers known. The thinking that must be done to create a useful test can discover and eliminate bugs before they are coded – indeed, test-design thinking can discover and eliminate bugs at every stage in the creation of software, from conception to specification, to design, coding and the rest.
—Boris Beizer
Introduction
In the previous chapter, we’ve learned how to write basic unit tests. But in reality, we encounter more significant problems – we need to fake or mock certain parts of our code or compare values. ...