| 
       WillReturnFake Behavior  | 
    Top Previous Next | 
| 
 This is usually used on live instances or in sequence, to make just one of the functions of a live object to return a fake object pointer. 
 TEST_F(Examples, ReturningFakeObjects) { // Arrange auto a = Isolator(); Person* personPtr = new Person(); 
 a.CallTo(fakePerson->GetAddress()).WillReturnFake(); 
 // Act auto result = GetAdderss()->GetZipCode(); 
 // Assert ASSERT_EQ(0, result); }  | 
Copyright Typemock Ltd. 2009-2025. All Rights Reserved.