Open dolfandringa opened 4 years ago
No it's not possible currently and I don't see how we can implement it. The way mocks work is by creating a sub-class that inherit from the class you want to mock, and alter the V-Table to redirect the call to the function we want to be called. When you use a fully qualified name to call your method (in the form Class::method
) the call won't go through the V-Table, so we can't redirect it or do anything with it.
I'll keep it open in case anyone have an idea but I guess it will never be implemented.
How can I verify that a child class calls a function on the parent class. In the sample below, I have separate unittests for
class A
. But when testingclass B
I want to verify that it indeed calls its parent class'test
function. Is this possible using fakeit?