Setting return value is mandatory?

Sep 12, 2011 at 6:47 AM


NMock.IncompleteExpectationException: You have to set the return value for method 'ListTeacherSignatures' on 'resultChoiceModel' mock.

I have written an expectation on a method in a mock object that actually returns a value, but I have not specified a 'With' or 'MethodWith'. I usually do this when the method itself is not created. I write a failing test for it, create the method, make it pass and then write expectations on what should happen if that method returns some value. This exception forces me to specify the return value at the beginning itself.

Is this by design because it is a good practice or..?