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
Although there are pros and cons for testing private method, does Isolator have some helper API for calling original private methods directly from test?

I know I can use CallOriginal with WhenCalled but I have no way of calling the method itself on the test.

Thanks.
asked by soguy (1.8k points)

2 Answers

0 votes
Hi soguy,

Isolator doesn't supply an API to drive private methods, but you can use one of the following:
- Visual Studio private accessors
- Reflection to obtain the private method by name and invoke it
- MbUnit private accessors

Doron
Typemock Support
answered by doron (17.2k points)
0 votes
Thanks, will try. Just wondered if TypeMock has some helper for that...
answered by soguy (1.8k points)
...