Month: November 2016

  • How to test a private method of a class?

    by

    in

    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…