Using Tests
Everything in this book until now has been about using TDD to design and build a unit test library. While that has been valuable, it’s been a bootstrap project where we’ve used TDD to help create a tool for TDD.
This chapter is different. For the first time, we’re going to use TDD to create something that will use a unit test library just like any other project you’ll be working on. This will still be a library that’s intended to be used by other projects. We’re going to create a logging library, and we’re going to use TDD and the unit test library to reach the following goals:
- Create a design that’s easy to use
- Improve the quality of the code
- Refactor the design as needed while maintaining confidence in the code
- Create tests that help capture the requirements and document the usage of the library
The approach should be familiar by now. We’ll start out simple and get something working...