Borrar filtros
Borrar filtros

Mocking a Set Method doesn't work

2 visualizaciones (últimos 30 días)
aoisdjas alsjdlsajd
aoisdjas alsjdlsajd el 8 de Oct. de 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

Respuestas (0)

Categorías

Más información sobre Mock Dependencies in Tests en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by