3 ms·
That's a good point. It's generally considered to be bad form to lock down the internals too much. It makes refactoring harder. In general, when testing a cl
by wccrawford 15y ago
That's a good point. It's generally considered to be bad form to lock down the internals too much. It makes refactoring harder.
In general, when testing a class I obey the spirit of 'testing 1 thing' by writing tests that gradually increase in scope, so the first tests are testing 1 thing, the next tests are testing 2 (1 of which was already tested) etc.