I am going to be giving a presentation on TDD and I always struggle with what to put in the demo when giving this presentation. I usually only have about an hour to do the actual coding portion of the demo so it can't be too extravagant. However, using a "classic" example (stack,queue) is a bit simplistic for most developers. It leaves them feeling as though this won't work in a real world solution.
There are a lot of concepts one needs to make TDD work well on their project besides understanding the core testing cycle (Test, Code, Refactor).
- IoC / Dependency Injection / Dependency Inversion
- MVP / MVC (in order to handle testing of user interfaces)
- Mocking
So the question is...
As a developer what kind of real world example would you like to see that incorporates these aspects and:
- Fits into an hour or so
- Doesn't overwhelm you
- Isn't so simple that you can't apply it to your current project