views:

107

answers:

3

Are there any .net based open source project which uses unit testing techniques to its best? I am looking for an open source project where the complete code base is covered with unit tests which are well written and from which we can learn new techniques and practices of doing proper unit testing.

A: 

If you want to see some database stuff, look at NHibernate and Castle's ActiveRecord. They both have unit tests in their source, and they are very popular projects.

Josh Pearce
Josh, don't take me wrong. I have seen popular projects having very miserable unit tests. Anyway, I will have a look at it. What qualities you have seen in the unit tests for those projects?
Anand Patel
I had a problem with the Oracle dialect for NHibernate, so I looked through the unit tests in the source. The NHibernate team didn't have a Oracle installation on their build machine, so they were not able to run their tests against Oracle, and hence a bug slipped out into production. I was able to understand and run the tests I needed against Oracle without any trouble.
Josh Pearce
+2  A: 

NodaTime is just getting started and it might be useful to read through the discussions to see how the contributors decide how to approach unit testing. It might be useful to keep tabs on how it is developed.

Richard Nienaber
A: 

I would recommend Rob Conery’s MVC-Storefront/Kona project. Last year I was looking for Test Driven Development examples, and found Rob's Project. He creates this project from scratch using TDD development principals so it has a slew of Unit tests for both the UI and data layer. The best part is it’s a real world application, so you can see how he solved a lot of common testing problems.

Anthony