Effacer les filtres
Effacer les filtres

Mocking a Set Method doesn't work

2 vues (au cours des 30 derniers jours)
aoisdjas alsjdlsajd
aoisdjas alsjdlsajd le 8 Oct 2021
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

Réponses (0)

Catégories

En savoir plus sur Mock Dependencies in Tests dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by