Few days ago i was asked to write unit tests for the code whatever we have written so far.
When i was writing unit tests by using microsoft test project, one of my collegues suggested why dont you try Pex.
Pex is a tool for generating unit test cases for dot net targeted code from microsoft research team. It analyzes the thoroughly and generates the code excellently.
You need to have Visual Studio Team System 2008(VSTS 2008) installed in you machine to use this. You can download Pex from microsoft website. Currently only academic version of Pex is available for VSTS 2008. Commercial version of pex is available only for VSTS 2010.
Using Pex generating test cases are very easy. Just select a project or class or method on which unit test cases need to be written, right click the mouse and click on Run Pex Explorations, thats it. You are done. Pex would write code for you. Pex also writes the bug fixes some time :).
The code coverage with the pex tool is almost 100 percent.
You can find more information on this tool at research.microsoft.com/en-us/projects/Pex/