3 ms·
I always feel happiest writing unit tests for functions that contain non-trivial logic. But I always feel sad when testing methods that mostly just introduce si
by sanderjd 13y ago
I always feel happiest writing unit tests for functions that contain non-trivial logic. But I always feel sad when testing methods that mostly just introduce side effects. It seems like when I'm running into more of the latter, it is often worthwhile to find ways to refactor toward having more of the former, but sometimes not.
- wlievens 13y agoTrue. I find unit tests the most useful and economical when I'm testing algorithms, rather than data bookkeeping or user interfaces.