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 private method call that I want to validate the input that was assigned to it. Is it possible to validate the input that was handed off to this method?

asked by bmains (13.2k points)

1 Answer

0 votes
Hi Brian,

Yes you can.
You can doe it by using the Isolate.Verify.NonPublic.WasCalled() method.
here is an example:
//in some class you have this method:
private void Foo(int x, string s)

//in the test code you can do this
Isolate.Verify.NonPublic.WasCalled(fake, "Foo").WithArguments(1, "a");

Please let me know if it helps.
answered by ohad (35.4k points)