Up till now, we were living in a perfect world, where no errors occurred. We were assuming that everything works just fine and as expected. Unfortunately, reality can be cruel and things just don't always work out as expected.
In this chapter, we shall:
So let's get on with it.
There are different reasons why we would want to write tests for our code. In test-driven development (TDD), we write tests to help us write better code. In this regard, tests are ...