The mocked constructor (if statics have been mocked). This can be used to return the mocked instance with new myMock.constructor() and for accessing statics.
Defines a single property and allows getters and setters to be defined. Returns a function verifier to verify get and set operations
Defines a single static property and allows getters and setters to be defined. Returns a function verifier to verify get and set operations
Used to setup the mock with multiple operators.
Mock.create
Sets up a single function and returns a function verifier to verify calls made and parameters passed.
Sets up a single property and returns a function verifier to verify value get or set operations.
Sets up a single static function and returns a function verifier to verify calls made and parameters passed.
Sets up a single static property and returns a function verifier to verify value get or set operations.
Verifies calls to a previously setup function. expect(myMock.withFunction("functionName")).wasNotCalled(): expect(myMock.withFunction("functionName")).wasCalledOnce(): expect(myMock.withFunction("functionName").withParameters("one", 2)).wasCalledOnce():
Verifies calls to a previously setup getter. expect(myMock.withGetter("propertyName")).wasNotCalled(): expect(myMock.withGetter("propertyName")).wasCalledOnce():
Verifies calls to a previously setup setter. expect(myMock.withSetter("propertyName")).wasNotCalled(): expect(myMock.withSetter("propertyName")).wasCalledOnce(): expect(myMock.withSetter("propertyName").withParameters("one")).wasCalledOnce():
Verifies calls to a previously setup static function. expect(myMock.withStaticFunction("functionName")).wasNotCalled(): expect(myMock.withStaticFunction("functionName")).wasCalledOnce(): expect(myMock.withStaticFunction("functionName").withParameters("one", 2)).wasCalledOnce():
Verifies calls to a previously setup static getter. expect(myMock.withStaticGetter("functionName")).wasNotCalled(): expect(myMock.withStaticGetter("functionName")).wasCalledOnce():
Verifies calls to a previously setup static setter. expect(myMock.withStaticSetter("functionName")).wasNotCalled(): expect(myMock.withStaticSetter("functionName")).wasCalledOnce(): expect(myMock.withStaticSetter("functionName").withParameters("one")).wasCalledOnce():
Generated using TypeDoc
The mocked object. This should be passed to your SUT.