views:

114

answers:

3

Hi,

I know there is a thread about open source projects with good code quality, but which projects have unit tests (With mocking) and are of a high quality?

Many Thanks

+1  A: 

Most of them do have unit tests.

For example, I consider NHibernate and the Castle project the most prominent ones. (Although I haven't examined Castle's code more closely yet, I know NHibernate has very nice unit tests.)

You can pull the source code from a public repository for both of them.

EDIT: SubText also had nice unit tests when I last checked.

Venemo
A: 

ASP .NET MVC source contains extensive unit tests that uses Moq for mocking.

Igor Zevaka
I really think this answer misses the spirit of the qusetion. Referring to Microsoft as an open-source shop seems incredibly disingenuous.
Kirk Woll
A: 

Gallio is an OSS automation plateform for unit testing. Interestingly enough, it uses its own testing framework (MbUnit) to run its unit tests during the build process. It's an interesting form of dog fooding.

While unit tests make a moderate usage of mocking (with Rhino.Mocks), they stress all the possible features of the test framework. You way want to have a look at the code here.

Yann Trevin