Monthly Archives: September 2014

I was speaking to a colleague recently during one of our fortnightly tech forums and he mentioned a specific class that he found difficult to get under test. The problem was that the constructor of the class was attempting to instantiate and configure new objects that were difficult to setup in a test harness. When you are faced with a constructor that instantiates classes internally there are a few different ways to break these dependencies safely. This article describes some of them and the reasons for using each one. Continue reading →