Mocking a Set Method doesn't work
3 次查看(过去 30 天)
显示 更早的评论
I want to Mock a set method while conducting unit tests. when I try to mock it, I get the error:
Unrecognized method, property, or field 'set' for class
Any help is appreciated.
The mock is defined as follows:
testCase.assignOutputsWhen(...
withAnyInputs(behaviorObj.set.blablabla),DoNothing);
The Set method is defined as follows:
function set.blablabla(obj)
arguments
end
%"stuf"
end
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mock Dependencies in Tests 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!