I'm trying to fake an abstract class and call one its method and it does not work.
the abstract class has a method called : LoadObjectInSession(string key);
I tried the following and each and everytime it returns null ;
1)
var con = Isolate.Fake.AllInstances<BaseController>();
Isolate.WhenCalled(() => con.LoadObjectInSession("myKey")).WillReturn("aaa");
2)
MockObject<BaseController> mockInterface = MockManager.MockObject<BaseController>();
mockInterface.ExpectUnmockedCall("LoadObjectInSession");
Isolate.WhenCalled(() => mockInterface.Object.LoadObjectInSession("myKey")).WillReturn("aaa");
Please help me understand why everytime it's returning null ?
Thank you