Hi,
I am trying to write mock method for the method which is taking LPCTSTR as a parameter.
Example: virtual LPCTSTR GetData(LPCTSTR key) const //declaration
//Calling function//
{
CString str = GetData(key);
//someother logic///
}
My mock method looks like this MOCK_CONST_METHOD1(GetData, LPCTSTR(LPCTSTR key));
And expected call looks like,
LPCTSTR csPSValue;
LPCTSTR key = _T("Testing");
EXPECT_CALL(*objBasicSection, GetData(key)).WillOnce(Return(csPSValue));
GetData function call always returns empty string.
Please help me.
Thanks,
Yogisha