TDD in C# without tools
This download contains the result of following the exercises in Chapters 13 which aims to convince you that there is nothing fundamentally difficult about Test-First Programming (or TDD). It contains the sort of code you might write when you're learning to program in C# and doesn't require the use of any special tools.
The code you will develop acheives the following:
* sets-up a simple test harness to run your tests
* creates a test adapter that:
* initialises the code under test
* executes your test cases against it
* writes a simple test case
* implements the code to pass the test (code under test)
* refactors the code to improve your code
Instructions:
1. Download the file and extract into a directory on your hard disk
2. Open the Visual Studio Solution (File - Open - Project Solution)
3. Build the Solution (Build - Rebuild Solution)
4. Run the program (Debug - Start without Debugging)
When you run the program a command prompt window opens prompting you to 'press a key to continue'. When you press a key the window closes and the program terminates. However, if you change the code so that the test fails an 'assert' message appears.
↧