3 ms·
That's the whole point. You can't test outcomes if they are dependent on internal hidden state as that affects the outcome. Whether you make it private or not
by nightski 6y ago
That's the whole point. You can't test outcomes if they are dependent on internal hidden state as that affects the outcome.
Whether you make it private or not hidden state leaks into the output since the output is dependent on it.
- kortilla 6y agoIt sounds like you’re confusing side effect free code with OOP. You can use OOP while having side effect free stuff that never requires you to assert internals.