I just switched to Moq and have run into a problem. I\'m testing a method that creates a new instance of a business object, sets the properties of the object from user inpu
The latest version of Moq supports this scenario.
Taken from the quickstart at http://code.google.com/p/moq/wiki/QuickStart:
// ref arguments
var instance = new Bar();
// Only matches if the ref argument to the invocation is the same instance
mock.Setup(foo => foo.Submit(ref instance)).Returns(true);