I'm working with the Autodesk Inventor SDK Com Interop library.
I've got a test set up where I need to return a mocked object from an indexed accessor but it gives me null instead of what I set it up to return:
var drawing = Isolate.Fake.Instance<DrawingDocument>();
var sheets = Isolate.Fake.Instance<Sheets>();
var sheet = Isolate.Fake.Instance<Sheet>();
Isolate.WhenCalled(() => sheets[null]).WillReturn(sheet);
var testSheet = drawing.Sheets[1];
testSheet.Activate();
that last line throws an exception because testSheet is null. What am I doing wrong with this?