O'Reilly logo

Applying Domain-Driven Design and Patterns: With Examples in C# and .NET by Jimmy Nilsson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. TDD and Refactoring

A good example is a powerful thing; I think we are in agreement on that. One way to describe Test-Driven Development (TDD) is to say that you use tests or examples for specifying the behavior. Those examples will serve you over and over again for many different purposes. They will serve you during development, for example, for finding lacking or incorrect requirements. When you refactor, the tests will be a safety net. After development they will serve you as quality documentation.

In this chapter we will not just talk about tests as examples; we will discuss TDD itself with some examples. I just think that’s a good way of describing what it’s all about.

After some initial discussion of TDD and the state-based ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required