Re:The Difference Between Unit Testing and Integration Testing
by wccrawford on Tuesday May 31, 2011 @07:56AM
(#2602197)
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.
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.