By bloid
via jeremyjarrell.com
Published: Sep 19 2007 / 17:40
Not many people would argue the value of dependency injection, especially when it comes to replacing a live object with a faked object for testing. Although most implementations of this take advantage injecting the faked object into the constructor of the consuming object at instantiation time, did you know that there's another way to easily swap objects in and out using generics?



Add your comment