ReturnFake |
Top Previous Next |
This method is usually used on live instances, to make just one of the functions of a live object to return a fake object pointer, without specifiying it.
TEST_F(Examples, ReturningFakeObjects) { Person* personPtr = new Person();
WHEN_CALLED(personPtr->GetAddress()).ReturnFake();
ASSERT_EQ(0, personPtr->GetAdderss()->GetZipCode());
ISOLATOR_CLEANUP(); }
|
Copyright Typemock Ltd. 2009-2025. All Rights Reserved.