Unit Test and Constructor IoC

28 10 2008

I might have said it before but, Constructor IoC has 2 big advantages over setter and getters.

  1. The IoC all happens in one shot, so there are no issues about a class being half configured, its always thread safe from the start.
  2. When doing writing Unit tests is really clear what is needed to make a class function
  3. Less code.

That was 3… oops… bloat 🙂

Advertisements

Actions

Information

One response

28 10 2008
Lance Speelmon

That makes a lot of sense to me.




%d bloggers like this: