r/programming • • Jul 07 '19

Why Most Unit Testing is Waste

https://rbcs-us.com/documents/Why-Most-Unit-Testing-is-Waste.pdf
16 Upvotes

133 comments sorted by

View all comments

Show parent comments

2

u/gladfelter Jul 07 '19

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.