When faking a class, you can set the default behavior of all methods. Then you can set a different behavior for a specific method.
MyClass* fakeMyClass = FAKE<MyClass>(FakeOption::<option>);
Fake Option
|
Behavior
|
FakeOption::Recursive
|
This is the default behavior when faking an object.
Methods will return:
· | For object types: Fake objects |
· | For other return types: Zero or equivalent |
This ensures that
|
FakeOption::CallOriginal
|
Calls to fake object methods will pass through the original implementation. Constructor is called during object's instantiation.
Useful when you want to maintain original behavior and modify specific methods.
|
|
Copyright Typemock Ltd. 2009-2023. All Rights Reserved.