O'Reilly logo

Practical Test-Driven Development using C# 7 by Clayton Hunt, John Callaway

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

Getting a single speaker

With the existence of Create, we can now very easily assert on the retrieval of an existing or non-existing speaker. According to Uncle Bob's Transformation Priority Premise, it is easier and simpler to test a singular item rather than a plural item, so while it doesn't completely fulfil the intent of the premise, we will test the retrieval of a singular speaker next.

We already have an exists test, so what will the next test be? The simplest test would be the retrieval of a single speaker, but if we are trying to avoid the gold standard, the most appropriate test would be examining what happens when a speaker does not exist.

For non-existing speakers, we have a few immediately apparent options. We could throw an ...

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