matlab.mock.constraints.WasSet Class
Namespace: matlab.mock.constraints
Constraint determining property set interaction
Description
The WasSet constraint produces a qualification
failure if an actual value is not a PropertyBehavior instance,
or if the property that corresponds to the PropertyBehavior was
not set the specified number of times.
Construction
constraint = WasSet provides a constraint
that determines property set interaction. If a property value was
set at least once, the constraint is satisfied. To qualify that a
property was not set, negate the WasSet constraint
with the tilde (~) operator.
constraint = WasSet( provides
a constraint with additional options specified by one or more Name,Value)Name,Value pair
arguments. For example, WasSet('ToValue',42) constructs
a constraint that is satisfied if a property value is set to 42, and WasSet('ToValue',42,'WithCount',3) constructs
a constraint that is satisfied if a property value is set to 42 exactly
3 times.
Name-Value Arguments
Properties
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.
Examples
Version History
Introduced in R2017a