sexta-feira, 15 de maio de 2009

NMock and TDD, by Dalmer Azevedo

I've always been an advocate for TDD although I think it is an uphill battle. I haven't given up on having my group adopting TDD but I wish they were using it more and more.

Today I was writing some unit testing in a object model that had many dependencies and I notice the amount of Cra*(#$(. objects (fakes) I had to have in order to test a simple functionality.

Although I use unity to inject these instances it was still a bunch of static classes that didn't do much. This monolithic approach was hard to change or adapt for different situations.

This situation made me leave my comfort zone and do some research with NMock. I have to tell you… I was hitting my head on my desk thinking why I did not use this before….

So I will spend some time talk about NMock and how you can benefit from using it in conjunction with TDD.


Read more at http://dalmertech.blogspot.com/2009_04_01_archive.html

Nenhum comentário:

Postar um comentário

Deixe seu comentário! Não uso verificação de palavras.