Class: MockObject
Represents a Mock object in which stubs for member functions and variables need to be specified.
Constructor
Gets invoked during the mock object preparation.
init (object{} mockObject)
- mockObject object{}
Object to register stubbing
Methods
when
function when(string functionName) returns MemberFunctionStub
Isolated Function
Allows a member function to stub.
Parameters
- functionName string
Function name to allow stubbing
getMember
function getMember(string fieldName) returns MemberVariableStub
Isolated Function
Allows a member variable to stub.
Parameters
- fieldName string
Field name to allow stubbing