storeValueWhen
클래스: matlab.mock.TestCase
네임스페이스: matlab.mock
속성이 설정되면 값 저장
구문
storeValueWhen(testcase,behavior)
설명
입력 인수
예제
대안
storeValueWhen
메서드를 사용하는 것은 PropertySetBehavior
클래스의 when
메서드와 함께 matlab.mock.actions.StoreValue
동작을 사용하는 것과 기능적으로 동일합니다. 예를 들어, 다음 코드 블록들은 기능적으로 동일합니다.
% Using the storeValueWhen method testCase.storeValueWhen(set(behavior.PropertyFoo)); % Using the StoreValue action with the when function import matlab.mock.actions.StoreValue; when(set(behavior.PropertyFoo),StoreValue);
StoreValue
동작을 사용하면 추가적인 기능을 사용할 수 있습니다. 예를 들어, 동일한 모의 객체 상호 작용에 대해 다른 후속 동작을 지정할 수 있습니다.버전 내역
R2017a에 개발됨