Testable Logs
August 11, 2020
“Testing Without Mocks” Training
May282024I’m offering in-person training for this material at Craft Conference in Budapest on May 28 and 29th. Register here.
To be notified about future “Testing Without Mocks” training courses, join the mailing list here (requires Google login).
For private training, contact me directly.
Every week in my Tuesday Lunch & Learn livestream, we choose a useful software development skill, define a challenge related to that skill, and solve the challenge live. This week, we’re building a testable logger.
The Log
class we’re building this week is high-level infrastructure. High-level infrastructure is just like normal infrastructure, except that it uses code we’ve already written rather than talking to the outside world directly. So for today’s episode, we’re tying together a lot of the concepts from previous episodes. We end up with a lovely utility that makes testing logging a breeze.
To follow along, download the code from GitHub and check out the 2020-08-11
tag. To see the final result, check out the 2020-08-11-end
tag or view it on GitHub.
Visit the Lunch & Learn archive for more.