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?