Friday, July 2, 2010

Bordello - Poor man's dependency injection

What do you do when there is no Spring or other facility to handle dependency injection? How do you fake services in your unit tests?

One way is to use Bordello to instantiate services in the application code. It is not dependency injection per se but it lets you test.



This is a variation on www.artima.com/weblogs/viewpost.jsp?thread=238562 that handles concurrency correctly.

No comments:

Post a Comment