I want to mock axes and call 'cla' on mocked axes.
%%setup test
import matlab.mock.actions.AssignOutputs;testCase = matlab.mock.TestCase.forInteractiveUse;[mockedAxes, behavior] = testCase.createMock(... 'AddedMethods',["isgraphics" "claNotify" "clo"]);when(withAnyInputs(behavior.isgraphics),AssignOutputs(true));%%use test
cla(mockedAxes) % -> failed since claNotify was not mocked
But while doing so, I am getting error-
failed since claNotify was not mocked
How to fix this?
Best Answer