matlab.mock.PropertyGetBehavior Class
Namespace: matlab.mock
Specify mock property get behavior
Description
Use the PropertyGetBehavior class to specify
mock object get behavior. There are several ways to specify get behavior.
Pass a mock object action, such as
matlab.mock.actions.AssignOutputs, to thewhenmethod.Pass a
PropertyGetBehaviorobject to a method of thematlab.mock.TestCaseclass, such asassignOutputsWhen.
To qualify mock property interactions, see matlab.mock.PropertyBehavior.
Construction
The mocking framework creates a PropertyGetBehavior instance
when you call the get method. Typically,
you construct the PropertyGetBehavior implicitly. For
example, testCase.assignOutputsWhen(get(behavior.MyProperty),'abc').
Methods
| when | Specify mock object property access action |
Copy Semantics
Value. To learn how value classes affect copy operations, see Copying Objects.
Version History
Introduced in R2017a