The Art of Unit Testing by Roy Osherove
This book has been around for a number of years, and I think I’ve come along to it rather late… Unit testing, perhaps mixed with developer integration tests, has been around for a long time and the concepts are fairly well known. This meant that Part One of the book, which introduces Unit Testing by way of some fairly simple examples, felt a little too basic and unnecessary. Part Two which covers core techniques also covered information that I didn’t need, though it did use Rhino Mocks in one of the examples and I haven’t tried using an auto-mocking framework before so will do some more reading about that.
Part Three of the book was useful though. It discusses the organisation and management of unit tests, based on the three pillars of readability, maintainability and trustworthiness, and the associated discussion brought up a load of very interesting points. There is also a good discussion of how to get unit testing accepted by your organisation (though to be honest I’d rather this had been a purely technical book without the politics of introduction).
The book is a fairly quick read and brings up a number of interesting points, though personally I’d rather borrow it from a library than have to buy it.