First TDD, Simple 2-tier C# Project - what do I unit test?
Posted
by Joel
on Stack Overflow
See other posts from Stack Overflow
or by Joel
Published on 2010-05-22T00:51:58Z
Indexed on
2010/05/22
1:00 UTC
Read the original article
Hit count: 691
This is probably a stupid question but my googling isn't finding a satisfactory answer. I'm starting a small project in C#, with just a business layer and a data access layer - strangely, the UI will come later, and I have very little (read:no) concept / control over what it will look like.
I would like to try TDD for this project. I'm using Visual Studio 2008 (soon to be 2010), I have ReSharper 5, and nUnit.
Again, I want to do Test-Driven Development, but not necessarily the entire XP system. My question is - when and where do I write the first unit test?
Do I only test logic before I write it, or do I test everything? It seems counter-productive to test things that have no reason to fail (auto-properties, empty constructors)...but it seems like the "No new code without a failing test" maxim requires this.
Links or references are fine (but preferably to online resources, not books - I would like to get started ASAP).
Thanks in advance for any guidance!
© Stack Overflow or respective owner