Class - test : MockObject

Represents a Mock object in which to create stubs for member functions and variables

Methods

Allows a member function to stub.

Allows a member variable to stub

when

(string functionName)

returns MemberFunctionStub
Isolated Function

Allows a member function to stub.

Parameters

  • functionName string
  • function name to allow stubbing

  • Return Type

    (MemberFunctionStub)
  • object that allows stubbing calls to provided member function

getMember

(string fieldName)

returns MemberVariableStub
Isolated Function

Allows a member variable to stub

Parameters

  • fieldName string
  • field name to allow stubbing

  • Return Type

    (MemberVariableStub)
  • object that allows stubbing retrieval of provided member variable