Test Driven Design By Example

added by stevevaubell
5/7/2012 11:12:22 AM

0 Kicks, 66 Views

We have started using Test Driven Design (hopefully properly) over the last few months and I wanted to share our experiences of it. Before we started using TDD our approach to unit testing was to find a unit of work that we had just completed and write a test to make sure the output of the method was what we expected. The most obvious problem with this is that while we are hoping that the unit test will be testing the method, actually what we were doing was testing the method and everything that used it. So in this case we were testing any service calls, database calls, any other classes and objects that are used in the method.