I use NUnit extensively. Since discovering the virtues of unit testing a couple of years ago, I will never turn back to unverified code. However, that does not mean I do not have, nor sometimes write, unverified code. There's all the legacy code (technical baggage) that you carry with you as well as the things you write in a rush when you just miss the test first philosophy. I won't go into philosophy here and I understand that generating tests from existing code violates the very priciples of test driven purists. duly noted...
After the fact, I want the tests to be so easy to write that there just ain't no good excuse for not writing them. Doubler to the rescue! Doubler has several features but I was most interested in unit test generation from concrete classes.
Since I failed to make this work more then a year ago and still yearn for a tool like this, I tried again, this time with success. It turns out to be an unexpected config requirement, possibly due to my old computer having three frameworks on it.
If you don't have Reflector, get it! Next, download Doubler. Unzip the dlls into a directory above Reflector. I am not sure why this is necessary but it will fail to find references if you have it as a Reflector sub directory.
Follow the Doubler installation video.
If Reflactor fails to load the add-in, double click on the failure message to see the exception details. Read on if you see the following message: System.BadImageFormatException: The format of the file
'ReflectorDouble.dll' is invalid.
from here
Create a config file for Reflector
(Reflector.exe.config) and add 'supportedRuntime' elements to it so
the .NET runtime will bind to the 2.0 framework
ReflectorDouble.dll will load successfully. The other two
release versions are there to make the configuration more flexible for those who
may need it.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
<supportedRuntime version="v1.1.4322"/>
<supportedRuntime version="v1.0.3705"/>
</startup>
</configuration>