Faking Static Methods

To fake all the static methods use the macro FAKE_STATICS( typeName )
#define FAKE_STATICS ( typeName )


Parameters:
typeName The type we want to fake the methods of


Use the type name as an argument. The FAKE_STATICS macro causes all static method calls to be faked. You can set the behavior of separate static methods using WHEN_CALLED macro and its completing statements. See WHEN_CALLED for details.

Remarks:

Example:

FAKE(ClassWithStatics);
/ Creates a faked instance of ConcreteClass.
WHEN_CALLED(ClassWithStatics::GetInt).Return(24);

 



See also: WHEN_CALLED