class B;
class A
{
public:
A() { b = std::make_shared<B>(this); }
void method() { b->methodB(); }
private:
std::shared_ptr<B> b;
};
class B
{
public:
...
void methodB() {}
};
I want to test if methodB is called from method. How to mock class B in order to make this possible?