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
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
It would be nice to be able to use method groups with Isolate.WhenCalled(). For example, if I change

Isolate.WhenCalled(() => filterTest.InitState()).CallOriginal();


I get this error:
*** Cannot call Isolate.WhenCalled() with method group fake.InitState. Try using Isolate.WhenCalled( () => fake.InitState()) instead

Please consider this feature for a future release :)
asked by dblack (8.4k points)

2 Answers

0 votes

Thank you for the suggestion, we will look into it.

Typemock Support.
answered by alex (17k points)
0 votes
If the suggestion is too hard, could the method signature be changed to
Expression<Action> and Expression<Func<T>>, please?

Code quality tools suggests method group as argument and that causes unit tests to fail.
answered by calin.pirtea (140 points)