如果要模拟的类的方法具有抽象的类/接口参数,如何创建模拟?
class DeviceMock : public IDevice
{
MOCK_METHOD2(AddEngine,
HRESULT(IEngine* engine, BOOL active));
MOCK_METHOD2(RemoveEngine,
HRESULT(IEngine* engine, BOOL active));
}
我收到一条错误消息:
"parameter of abstract class type 'IEngine' is not allowed"
帮助!