Archive for the ‘Test-Driven Development’ Category

Refactoring, rewriting existing code to make it as small, efficient, and ultimately as testable as possible, is something of a double-edged sword.  In the Test-Driven world, it’s an absolute necessity.  In the non-TDD world, however, it becomes a potentially very dangerous activity that can make things worse off than where you started. If Only I […]

Recently I was building an HttpModule project, and quickly ran into a serious problem: I couldn’t test my code.  The reason?  I was using objects that were unmockable. The scenario involved passing an HttpContext object into my module so that I could manipulate certain properties.  What’s wrong with that?  Well, for starters HttpContext is sealed, […]

I’ve been reading a lot interesting posts lately around Test-Driven Development adoption, or the lack thereof, the collective synopsis of which goes something like: TDD is too difficult and cumbersome to gain widespread traction.  It needs to change if it is to get anymore mindshare among developers. Roy Osherove makes a compelling argument that developers […]