What's the best way to implement BDD/TDD in .NET 2.0?

We use MbUnit and Rihno Mocks and they prove to work very well together. When doing TDD you will almost certainly need to do some form of dependency injection, while this can be done manually, its worth looking at an IoC container such as Castle Windsor.

It well worth looking at John Paul Bodhood's screen casts to get you started. JPB's Blog


NUnit and Rhino suit well and the auto-mocking container might be of interest.

If you're looking at BDD too then NBehave is probably a good choice. If however you just mean the style of BDD that relates to unit testing (xSpec) though you can get away with adding a framework (though things like specunit do add some synctactic sugar), but you might want to look at MSpec is also interesting.


Check out Rob Conery's screencast on BDD using MSpec. Very impressive http://blog.wekeroad.com/mvc-storefront/kona-3/

edit: I now use this approach: http://10printhello.com/the-one-bdd-framework-to-rule-them/