Private methods should get tested as part of testing the public interface. This is nothing new and is part and parcel of good unit testing best practice. If your functions are discrete and abide by the single responsibility principle then this shouldn’t pose any technical difficulties.

I stated in my response that when implementing a 3rd party library you should use a facade to abstract your code away from the implementation details of the library. Maybe you didn’t grasp the full impact of what I was describing. If you didn’t write the code, then wrap it. In this way your code is not coupled to the 3rd party library. I also mentioned about using interfaces to solve this very issue in my response. This means you can freely change the details of the 3rd library (or even completely change the library) with little change to the code.

“Design to the abstractions, code to the concertions.”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store