Object - test : MemberFunctionStub

Represents an object that allows stubbing member function invocations.

Constructor

__init

(T18 mockObject)

  • mockObject T18
  • object to register

Methods

Sets the arguments list to consider when stubbing the function call.

Sets the value to be returned when the function is called.

Sets the values to be returned when the function is called repeatedly.

Sets the function behavior to do nothing when called.

withArguments

(anydata | error[] args)

returns MemberFunctionStub

Sets the arguments list to consider when stubbing the function call.

Parameters

  • args anydata | error[]
  • arguments list

  • Return Type

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

thenReturn

Sets the value to be returned when the function is called.

Parameters

  • returnValue any | error
  • value or error to return

thenReturnSequence

Sets the values to be returned when the function is called repeatedly.

Parameters

  • returnValues any | error[]
  • value or error to return

doNothing

Sets the function behavior to do nothing when called.