Using step by step examples, this chapter demonstrates how Test-Driven Development can be used to implement an unbounded Stack. After going through a test list of 14 tests, it is observed how the resultant test code is 4 times the size of the Stack code, since the focus is on what the class does and how it is used instead of how it is implemented.
James W. Newkirk has been a software practitioner for more than 18 years. He has been involved with the agile processes community since its inception. He has contributed to many books, written many articles, and is a frequent speaker at XP/Agile Universe and OOPSLA. He has been a frequent contributor to the development of NUnit, a unit testing tool for the .NET environment, and is now the administrator of this open source project.
Alexei A. Vorontsov has been a software developer for more than eight years. He has developed software in a variety of environments, from scientific mathematical applications to enterprise systems. His interests include development, testing, and management of large distributed software solutions and pragmatic application of agile methods to meet the goals of enterprise system development in a cost-efficient manner.