The Task
The first step is to brainstorm a list of tests that are needed for completion. The task overall is defined as building a read-only data access layer to support the retrieval of a Recording entity and all its associated entities. The existing database schema (described in Chapter 4) is shown in Figure 5-1.
Figure 5-1. Recordings data model
So, given this schema and the task definition, what are the types of things we should test?
Connecting to the database
Individual entities in isolation (Recording, Label, Review, Reviewer, Track, Artist, and Genre)
Relationships between entities (Review-Reviewer, Track-Genre, Track-Artist, Recording-Label, ...
Get Test-Driven Development in Microsoft® .NET 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.