Finding NUnit Examples

It's sometimes hard to learn a new talent when you have nothing to go on. Software development is like that. You learn the mechanics and get the lingo down, master the tools, yet you're still looking for that elusive way to get going. Each person learns differently and those of us that learn by example are sometimes left out to pasture when you're talking about learning things like unit testing.

Unit testing is an art as much as it is a science, so for those that are looking for good examples, we often turn up the same AddBalanceToBankAccount test that keeps coming up. There are great examples out there, but they are examples written for the purpose of providing an example rather than a real test in the context of a real system. So where are the real projects with real tests?

I've put a list together of projects that have unit tests available to them. As these are all open source and you're welcome to just look at them for the learning value of seeing what a set of unit tests in a system look like. What makes a good test and how does it relate to problems people thought needed testing. There are some very good examples here (and some projects that have oodles of tests, like Mono and Microsofts Enterprise Libraries).

You can find the sample page on the NUnit.com Wiki page here. While it’s a page on the NUnit.com site (which is .NET based) it does contain Java and other language references but I figured it would be a good thing for completeness (XPlanner has a great set of tests to look at). After all, reading Java and C# is like the difference between color and colour.

Enjoy!

No Comments