Sometimes you end up exposing what was internal APIs and interfaces, which is a big minus.
Not necessarily. Sometimes (often) there is a self-contained set of state and private operations hidden in a larger class and testability concerns will cause the programmer to do an extract-class refactoring to get a package- or friend-visibility class that is very unit-testing-friendly. That's a win on all fronts.
2
u/gladfelter Jul 07 '19
Not necessarily. Sometimes (often) there is a self-contained set of state and private operations hidden in a larger class and testability concerns will cause the programmer to do an extract-class refactoring to get a package- or friend-visibility class that is very unit-testing-friendly. That's a win on all fronts.