Object - test : MockObject

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

Constructor

__init

(T16 mockObject)

  • mockObject T16
  • object to register stubbing

Methods

Allows a member function to stub.

Allows a member variable to stub

when

(string functionName)

returns MemberFunctionStub

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

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