I have extended objects of type IDataReader with some extension methods that I needed. The problem is now when I try to mock the IDataReader, the extended method is not included in the mock so when the row Expect.Call(reader.ExtensionMethod()).Return(someValue) is reach the ExtensionMethod is executed which is not what I want! I want that call to be record and when the extension method is call from somewhere else I want it to return someValue.
Does anyone know how to get around this?
The answer seems to be no at the moment. To bad though, but I solved my problem with writing a mock class for my interface I wanted to mock instead. Since I didn’t needed that many methods of the interface it went pretty fast.