How to mock a derived class that calls its base class methods?
问题 I am unit testing a derived class and want to EXPECT_CALL that a certain method belonging to its base class is called. For example: class Base { public: void move(int x, int y); }; class Derived: public Base{ public: RESULT update(); private: int age; }; HRESULT Derived::update(void) { int param1 = 5, param2 = 10; move(param1, param2); age++; return SUCCESS; } I can't just create a mock for Derived and expect move since there is no dependency and the actual move() will be called. How can I be