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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…