Say I have a method that takes a list of objects. The method will normally take 20 objects easy. Each object has 15 or so properties on them.
To unit test this, I need to type out all 20 objects so that I can pass them into my method.
This is frustrating when I can see perfectly good examples of what I need sitting there in my debugger watch window.
Is there a tool to take an object that I have and make it output to C#?
NOTE: I saw this question: How can I serialize an object to C# object initializer code? but the code it generates does not work...
I can't think I am the first to want this. Is it harder than I think? or are there tools out there that do it already?