Unit Test Checklist for .NET business objects

1 test per method
1 assertion per method (unless it is testing something trivial, like null on return object)
Always check for null on return object unless null means something.
Always add ExpectedException test for System.ArguementNullException, unless null means something or if it is an optional parameter. (NullReferenceException just isn’t as useful because you see it so often.)
Repeat tests for each constructor.

Comments are closed.