--

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.”

--

--

Dominic Burford

A father, cyclist, vegetarian, atheist, geek and multiple award winning technical author. Loves real ale, fine wine and good music. All round decent chap.