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
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
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.
ASP .NET MVC source contains extensive unit tests that uses Moq for mocking.
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.