I have recently been using NBuilder by Gareth Down. In my opinion, this testing tool is an absolute must for your toolbox. In my current project, we are going through a good deal of effort to create and correctly populate our objects under test. We have built an extensive suite of test helper methods to produce the objects. Now, with very minimal effort (and much less code) I can create a new object. Here is the description of the tool from the website home page:
“Through a fluent, extensible interface, NBuilder allows you to rapidly create test data, automatically assigning values to properties and public fields that are of type of the built in .NET data types (e.g. ints and strings). NBuilder allows you to override for properties you are interested in using lambda expressions.”
The NBuilder website contains a lot of great examples of the flexibility and power of this tool. Also, be sure to check out the NBuilder page on google code for moer examples, the features and bugs list, etc.
Thanks for creating such a great tool Gareth!