I am trying to GMOCK a class:
class A
{
public:
void method1()
{
std::cout << "Called" << std::endl;
}
};
class B : public A
{
public:
void method1()
{
............
A::method1();
............
}
};
How can I write test case for class B method1 to call mock method of class A method1 when referred in the flow? Hence B's method1 should be called upon but when it needs to call A's method1 - it should instead call mock method and continue.