While working on some unit tests at one of my former employers, I reached a point where it became obvious that I’d hit a wall and I didn’t know of a good way to structure and build the tests that I was working on. What I didn’t know at the time was that I was wasting a lot of time and code building my own mocking objects instead of using a mocking library like rhino mocks. After beating my head against the wall for what seemed like forever I finally broke down and bought The Art of Unit Testing with Examples in .NET and I finally started to grasp the concept of good unit testing.
The book is broken down into 4 parts, a basic primer on unit testing, a section on the core techniques, a section on how to structure your tests to make them easier to maintain, and a section on section on how to add unit testing to your organization. All of this information is given in a easy to understand way with a number of good examples in. Net. In short the book is an excellent way for you to learn the basics and a number of the more advanced concepts in unit testing. I highly recommend it for anyone who is trying to get a good handle on unit testing their code.