chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes

I have a fake interface which uses another interface as a property that has a Get method to return data. I'm getting an object reference not set to an instance of an object when I attempt to do the following. Note that main.Sub refers to an interface.

var main = Isolate.Fake.Instance<ICoreInstance>();
Isolate.WhenCalled(() => main.Sub.Get("First")).WithExactArguments().WillReturn("A");
Isolate.WhenCalled(() => main.Sub.Get("Second")).WithExactArguments().WillReturn("B");
Isolate.WhenCalled(() => main.Sub.Get("Third")).WithExactArguments().WillReturn("C");
Isolate.WhenCalled(() => main.Sub.Get("Fourth")).WithExactArguments().WillReturn("D");

It errors on the second, which I bolded above. Why would that be?

asked by bmains (13.2k points)

2 Answers

0 votes

What version of Isolator are you using? Also, would it be possible for you to send us a small reproduction project to support at

answered by igal (5.7k points)
0 votes
Scott -

Which version of Windows are you using?

Also, which model scanner is installed?

Do you get this error before or after the Kofax Desktop Splash Screen appears?


answered by Xylifrost (180 points)