You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, it is not possible to mock neither final nor private methods currently.
Current Mocka is fully based on inheritance. So mocking methods means we override parent method with child's one. In case of private method we would need to change the parent's method directly to make any effect.
Mocking (defining) private method in child class would not change anything as usage in parent class would always trigger parent's method.
It would be possible with new approach (implemented in #37) which allows redefining methods without creating child class. You could finally effectively mock/stub/redefine private method then.
Not sure if it's required but it would be good to throw on such attempts.
The text was updated successfully, but these errors were encountered: