Class: matlab.mock.TestCase
Package: matlab.mock
Return history of mock interactions from TestCase
instance
history = getMockHistory(
returns the history from a mock object. testcase
,mock
)history
is an array of matlab.mock.InteractionHistory
objects. Each element in history
corresponds to one method call, property access, or property modification. The array elements are ordered, with the first element indicating the first recorded interaction. This method returns interactions with publicly visible methods and properties only. For example, the following interactions are not recorded:
Calls to Hidden
methods
Calls to Sealed
superclass methods
Accesses or modifications of concrete superclass properties
You can obtain the same history of interactions using the matlab.mock.InteractionHistory.forMock
method. For example, if you have a matlab.mock.TestCase
instance tc
, and a mock object mock
, the following method calls are equivalent.
h = matlab.mock.InteractionHistory.forMock(mock); h = tc.getMockHistory(mock);
However, you do not need access to the matlab.mock.TestCase
instance to use the matlab.mock.InteractionHistory.forMock
method.