DevDays 2009 day 1 TDD and S.O.L.I.D

A small introduction for these posts you can find here. My third session was a wildcard session by Dennis Doomen on TDD and S.O.L.I.D. Even though the room wasn’t on the map and the session wasn’t on the session overview the room was packed.

People who didn’t know what inheritance is, were asked to leave.

Dennis uses a definition by Michael Feathers to define quality. You must be able to write a unit test of your code within five minutes. There are multiple principles you can use, Dennis is going to focus on some of them:

  • TDD
  • S.O.L.I.D

TDD is a design process, tests are your first users, tests can be documentation. If TDD hurts you are doing it wrong.

For S.O.L.I.D I say read the book by Uncle Bob Martin. Dennis gives an introduction.

In the demo Dennis an aaa template for creating unit tests.( Arrange, Act, Assert) For naming he follows a Should_When naming convention. During the demo, Resharper and RhinoMocks prove their usefulness. Make unit tests intention revealing.

An extra tip from Dennis, it is possible to decorate your unit tests with the workitem attribute, this will couple the unit test with a workitem in TFS.

The samples are posted on Dennis’s blog.

It was a nice session with enough interaction. I would like to see this talk held in a room full of none believers though but then with enough time to discuss. For a nice simple introduction to S.O.L.I.D watch the dimecast screencasts.

About Kees Dijk

Husband, father and Software Architect at Sogeti. Loving my work and having fun while doing it. Interested in all the aspects of software development with a special love for Model Driven Development, Code Generation and Software production lines.

Published by

KeesDijk

Husband, father and Software Architect at Sogeti. Loving my work and having fun while doing it. Interested in all the aspects of software development with a special love for Model Driven Development, Code Generation and Software production lines.

One thought on “DevDays 2009 day 1 TDD and S.O.L.I.D”

Leave a Reply

Your email address will not be published. Required fields are marked *