Why can't I change the return value in a Rhino Mocks stub object?
问题 Forgive me if this is a stupid question, but I'm fairly new at mocking, and am trying to get my head around it. I have some unit tests (using the built-in Visual Studio 2010 Professional testing features), which use a stub that is needed by a method. I created a stub, and set the default return values for a couple of properties and a method, and all works well. I have a static class that sets up the stub, and this is used in the TestInitialize method to set up the stub... public static