Fantastic nugget that I rediscovered today: "If you have the urge to test a private method, the method shouldn& #39;t be private; if making the method public bothers you, chances are, it is because it is part of a separate responsibility; it should be on another class."
This is from Working Effectively with Legacy Code by @mfeathers - I& #39;ve found it& #39;s a book which keeps on giving if you& #39;re interested in how to test your code effectively
This thread got a fair amount of engagement so I decided to write a post with more discussion and a real-world example. Check it out: https://twitter.com/noahsark769/status/1266102522680209408?s=20">https://twitter.com/noahsark7...
You can follow @noahsark769.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: