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 :)

Advertisement

Actions

Information

One response

28 10 2008
Lance Speelmon

That makes a lot of sense to me.

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

Join 81 other followers