Chapter 4. Test-Driven Development

Test-driven development (a.k.a. test-first programming) represents an important change to the way most programmers think about writing code. The practice involves writing a test before each new piece of functionality is coded into the system. The preceding chapter hinted at this, with some of the tasks defined as tests.

The tests themselves become part of the software. They are written in the same language that the production code is being written in (in this case, C#). This is a new concept for many developers, and they find it hard to move into the mindset of writing test code before they write “production” code. This chapter emphasizes the need to develop high-quality code and guides you through exercises to ...

Get eXtreme .NET: Introducing eXtreme Programming Techniques to .NET Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.