• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!



Page history last edited by PBworks 15 years, 6 months ago

Test Driven Development: an intro for C# developers

Mathias Brandewinder


Sessions From this Presenter (Code Camp Website)

All Sessions (Code Camp Website)

Home (Code Camp Website)


Update, Nov 11, 2008: Posted the slides and code on my blog.



Update, Nov 10, 2008

Thank you so much for everyone who came to the session - you were a great crowd, asked great questions, and made it very fun for me! I am just reviewing the slides and the code, and will post it shortly (Wednesday latest). Please do not hesitate to email me if you have any question. In the meanwhile, a few links:


Free unit-testing tools I used:


NUnit: http://www.nunit.org/index.php

Rhino Mocks: http://ayende.com/projects/rhino-mocks.aspx


Free community version, paying professional version:




Related posts or articles:




Good post, interesting on how to "call" your tests: http://dannorth.net/introducing-bdd


RowTest (passing multiple values to a test)







There is documentation and lots of discussions on the Rhino Mocks page. The documentation for version 3.5 is sometimes a bit lacking, I think because the release is very fresh.

Quick "how-to": http://blog.benhall.me.uk/2008/05/rhino-mocks-35-goodbye-record-and.html

Great "philosophical" article on Mocks: http://martinfowler.com/articles/mocksArentStubs.html


MbUnit, an alternative to NUnit


I haven't worked with it personally but heard good things about it:





If you want to write "clean code that works, now", you should look into test-driven development. In a nutshell, the idea of TDD is to first write automated tests, and only then the code that should pass the test. It is a simple and methodical way to write good code, fully tested from the get-go; beyond that, it also promotes better design, and helps keep your sanity during projects.

My goal in this session is to get you started with TDD, so that you are ready to use it the moment you leave the room. I will demonstrate how TDD works on a small example, using both open-source tools like NUnit, and the testing tools Microsoft has added to Visual Studio 2008.

This session is aimed for beginners. The examples and tools will be in C#, but should be straightforward for Java developers as well.


Please add questions, links, comments, notes, downloads ... below.

Comments (0)

You don't have permission to comment on this page.