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

To verify the number of times a friend parameter method is called I have used below code 

Isolate.NonPublic.WhenCalled(fakeDeposit, "ValidateISAContributionLimit").DoInstead(Function(c)
                                                                                                methodCallCount += 1
                                                                                                c.WillCallOriginal()
                                                                                            End Function)

 

But the above code is throwing below run time exception

*** WhenCalled() with a fake object can only be used on instance methods. To set behavior on static method WealthNET.Server.Deposit.ValidateISAContributionLimit use WhenCalled() with a type argument

Thanks in advance

 

 

asked by onkarw210 (1.1k points)

Please log in or register to answer this question.

...