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
In my program under test I have a manager class that has in it references to other classes. To achieve my testing goals I have needed to do this in a [TestInitialize] method:

Isolate.WhenCalled(() => manager.ClassA).WillReturn(Isolate.Fake.Instance<ClassA>(Members.CallOriginal));
Isolate.WhenCalled(() => manager.ClassB).WillReturn(Isolate.Fake.Instance<ClassB>(Members.CallOriginal));
Isolate.WhenCalled(() => manager.ClassC).WillReturn(Isolate.Fake.Instance<ClassC>(Members.CallOriginal));

It would be nice if I could replace that with this:
Manager manager = Isolate.Fake.Instance<Manager>(Members.ReturnRecursiveCallOriginals);

Here is a screenshot to further illustrate:

[ img ]
asked by Neil (27.7k points)

2 Answers

0 votes
Hi Neil,

Thanks for the idea, I've added this as a new feature request.

Best Regards,
Elisha
Typemock Support
answered by Elisha (12k points)
0 votes
Thanks Elisha.
answered by Neil (27.7k points)
...