class IEmployeeServiceProxy
{
public:
virtual ~IEmployeeServiceProxy() { }
virtual void AddEmployee(const Employee&) = 0;
virtual int GetEmployees(std::vector<Employee>&) = 0;
};
struct Employee
{
boost::uuids::uuid Id;
std::string Name;
};
m_Mocks.ExpectCall(m_EmpSvcMock.get(), IEmployeeServiceProxy::GetEmployees).Return???;
我如何模拟它,以便它通过参数而不是 int (这是方法的返回类型)返回一个 std::vector ?
另外,如果有超过 1 个 ref 参数怎么办?