For mocking member methods with ExpectCall or OnCall you can use the Do method. But for static functions if you try Do the compiler will tell you that Do is not a member of the Call class. Is there a similar mechanism?
Ok my bad.
Apparently putting the Do behind the Return does not work:
mocker.OnCallFunc(ReadFile).Return(true).Do(ReadFileMock);
but this just compiles with no problem at all: mocker.OnCallFunc(ReadFile).Do(ReadFileMock).Return(true);
I didn't know there was an obligatory order. And I should have supplied code samples.