Package: matlab.mock.actions
Store property value
The StoreValue
action specifies that the specified
value is stored when setting a property.
By default, when you set property values in strict mocks, MATLAB® throws
an exception. To specify that the framework stores the value of a
mock object property, use the StoreValue
class.
action = StoreValue
stores a property value.
repeat | Repeat storing property value |
then | Action for mock object interaction or action subsequent to storing property value |
Value. To learn how value classes affect copy operations, see Copying Objects.
For a simple directive to store property values, you can use
the storeValueWhen
method
of the matlab.mock.TestCase
class. However, there is
more functionality when you use the StoreValue
action.
matlab.mock.actions.DoNothing
| matlab.mock.actions.ThrowException
| matlab.mock.TestCase
| when (PropertySetBehavior)