O'Reilly logo

Implementing Domain-Driven Design by Vaughn Vernon

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

Testing Services

We want to test our Services to make sure we gain a client perspective on how we should model. We want our domain-focused tests to reflect the way the model should be used, while at this point ignoring some of the finer software correctness focus.

Isn’t It a Bit Late to Test?

I have normally introduced tests before implementations. I did show some test-first code snippets earlier when analyzing the need for a Service. It’s just that I found it more natural to discuss the implementation a bit earlier in this chapter, that’s all. However, this does show that test-first isn’t an absolute necessity, although it may limit a proper modeling focus.

These tests demonstrate how to properly use AuthenticationService, and we first test ...

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