1.

Can I "reset" A Mock?

Answer»

RECENTLY we decided to go on with this feature for tricky scenarios where mocks are created by the container. Before that, the lack of a reset METHOD was DELIBERATE to promote good testing habits and to make the API simpler.

Instead of reset() please CONSIDER writing simple, small and focused test methods over lengthy, over-specified tests.

Recently we decided to go on with this feature for tricky scenarios where mocks are created by the container. Before that, the lack of a reset method was deliberate to promote good testing habits and to make the API simpler.

Instead of reset() please consider writing simple, small and focused test methods over lengthy, over-specified tests.



Discussion

No Comment Found