matlab.mock.constraints.Occurred Class
Namespace: matlab.mock.constraints
Superclasses:
Constraint qualifying mock object interactions
Description
The Occurred
constraint qualifies the occurrence of one or more mock object
interactions. It produces a qualification failure for any actual-value array that specifies at
least one interaction that did not occur. The actual value must be an array of
MethodCallBehavior
, PropertyGetBehavior
, or
PropertySetBehavior
objects that all refer to the same mock object.
Use the Occurred
constraint to qualify any combination of method calls,
property accesses, or property modifications.
By default, the constraint qualifies that all interactions occurred at least once and in
any order. The RespectingOrder
name-value pair enables qualification that
the interactions occurred in the specified order.
Construction
constraint = matlab.mock.constraints.Occurred
provides a constraint that
determines if all specified interactions occurred.
constraint = matlab.mock.constraints.Occurred('RespectingOrder',
provides a constraint that respects the order of occurrence of the specified
interactions.tf
)
Input Arguments
Properties
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.
Examples
Version History
Introduced in R2018b