7 ms·
> side effects can be encapsulated, abstracted, and injected to create testable code in "side-effect" heavy situations. Absolutely, but at that point you're mo
by lmm 9y ago
> side effects can be encapsulated, abstracted, and injected to create testable code in "side-effect" heavy situations.
Absolutely, but at that point you're moving the side effect out to the boundary and separating it from the logic. Then you can unit-test the logic away from the side effect (but the test of the side effect itself still has to be an integration test).