Conclusions on Unit Testing with Mock ObjectsTesting using Mock Objects on this project was an interesting experience. On the positive side, it enabled me to test software with a rigour I have never been able to do before. On the negative side, at times I felt they adversely affected my design and obfuscated my code. Sometimes it felt like they were making things harder than they should be, but with reflection I think that it was worth it and they've ensured I've got a high-quality product. Whilst there are some things that'd I'd do a little differently, I definitely think it's a useful pattern and I am already thinking about strategies to reduce the negatives. Finally and most importantly, it gave me the tools and the confidence to know that if I want, I can pretty much write a test for anything. |