I have a method that should only be called when a property of a specific object is set to false. This is its initial value. After the first call, the property is set to true, ensuring that the call is only ever made once.
However, when I mock the class that performs this change, the mock object does not change the property of the underlying object.
Is there a way to force a change of a property on an object is response to an Expectation being met?
Something along the lines of...
Expect.Call(mockedObject.TestMethod(underlyingObject)).NowDoThis(delegate() { underlyingObject.Processed = true; });