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
I have a method with a local function that I would like to be able to fake. In the example below, I would like to be able to say something like Isolate.NonPublic.WhenCalled(someObject, "LocalHelperMethod").WillReturn("fakeData"), but the method is not found. Is there a way to do this?

public string MethodUnderTest()

{

   // Do stuff.

  return someValue;

  string LocalHelperMethod() // Private to the containing method.

  {

      // Desire to fake this return.

  }

}
closed with the note: Support for c# Local functions is implemented in our latest version on site.
asked by Pete_R (1.6k points)
closed by Alon_TypeMock

1 Answer

0 votes

Hello Pete,

Unfortunately we do not support it yet but it is in our roadmap and we are making efforts to implement it as soon as possible.

Bets regards,

Daniel Markov,

support specialist.

answered by Daniel Markov (5.8k points)
...