Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

matlab.mock.PropertyGetBehavior class

Package: 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 the when method.

  • Pass a PropertyGetBehavior object to a method of the matlab.mock.TestCase class, such as assignOutputsWhen.

To qualify mock property interactions, see matlab.mock.PropertyBehavior.

Construction

The mocking framework creates a PropertyGetBehavior instance when you call the matlab.mock.PropertyBehavior.get method. Typically, you construct the PropertyGetBehavior implicitly. For example, testCase.assignOutputsWhen(get(behavior.MyProperty),'abc').

Methods

whenSpecify mock object property access action

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects.

Introduced in R2017a

Was this topic helpful?