Hello,
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?
Thanks.