Tag Archives: Testing

Dependency Injection by Extension pattern

The problem

You need to use some kind of Dependency Injection (DI for short) to provision some System Under Test (SUT for short) in tests you’re writing, but can’t or don’t want to use a DI framework to do so.

Alternative titles for this post include:

  • Dependency Injection without a Dependency Injection framework
  • Why misusing the default namespace for tests is evil
  • Make code more testable without completely messing it up

Continue reading Dependency Injection by Extension pattern