I have a factory that returns a smart pointer. Regardless of what smart pointer I use, I can\'t get Google Mock to mock the factory method.
The mock object is the im
in the mock class put same as you want
MOCK_METHOD0(Create, std::unique_ptr());
and in the test as below
EXPECT_CALL(, Create()) .WillOnce([]()->std::unique_ptr{ return std::make_unique(); });
if vs 2010 not support for lambda, you can use a functor