Day: November 22, 2016
-
How to test a private method of a class?
Today I got a question from my collegue how to test a method that is marked as private on a class? My first reaction was ‘well just make it public’ but of course that would break the class encapsulation, and there are ways to actually test a private method without breaking this encapsulation. What you…