Hey aringan,
That's not a problem at all, I'm happy to help!
Members.CallOriginal sets the default behavior of the fake object, so I don't think it has something to do with it.
Notice that when you use WhenCalled like this:
Isolate.WhenCalled(() => con.LoadObjectInSession("myKey")).WillReturn("aaa");
It doesn't mean that when you call con.LoadObjectInSession() with "myKey" it will return "aaa", it means that when you call con.LoadObjectInSession() with any argument it will return "aaa".
For example, this test will pass as well:
public void test()
{
var con = Isolate.Fake.AllInstances<BaseController>();
Isolate.WhenCalled(() => con.LoadObjectInSession("myKey")).WillReturn("aaa");
object res = con.LoadObjectInSession("anotherKey");
Assert.AreEqual("aaa", res);
}
If you use WhenCalled like this:
Isolate.WhenCalled(() => fakeBaseController.LoadObjectInSession("myKey")).WithExactArguments().WillReturn("aaa");
It does mean that only when you call con.LoadObjectInSession() with "myKey" it will return "aaa".
Maybe that misunderstanding is what caused the problem..