Back in 2010, I met my first nemesis for the 2010’s it was the Art of Unit Testing from Manning. This is a combination of a great book and an infuriating book all in one. Lets dig into my complicated history with the Art of Unit Testing as we wander through the library.
Art of Unit Testing
I really, really enjoy it but failed to get through it to the end 5 different times.
What held me back?
In all worlds, pillars exist to prevent civilization collasping and us reverting to hairless monkees who through crap at each other. The world of programming has its pillars too. One of those is the concept of encapsulation. He addresses it, I believe in chapter 5. If there is a problem in unit testing, it is that you can only test what is public at least in the way I organize my tests. Since the organization is the test are in separate projects, you get lots of public methods. If it is public then it is not encapsulated away from people. They can play with it. The author’s reasoning is that I am just a prude and the unit test is a valid user and if the user has a valid reason for needing it expose then expose it.
I ran headlong into a wall and metaporically cracked my skull. It kept me from finishing the book for years.
Regardless, I did finish it and it has been a major book in my advancement over the years. I may not always like unit testing but I do see the advantages of it.