Pointless example. There is no value in testing the method for success. However how it deals with failures/exceptions inside the dependencies might be worth testing.
Anyone with some amount of testing experience knows that testing isn't a silver bullet, and sometimes its not worth testing methods (straight getters and setters for example although there may be value there in a dynamic language).
As with many things, people jumped from one extreme of test/mock everything to test/mock nothing. The correct solution is usually somewhere in the middle.
1 comment
[ 3.8 ms ] story [ 10.5 ms ] threadAnyone with some amount of testing experience knows that testing isn't a silver bullet, and sometimes its not worth testing methods (straight getters and setters for example although there may be value there in a dynamic language).
As with many things, people jumped from one extreme of test/mock everything to test/mock nothing. The correct solution is usually somewhere in the middle.