Retrieve a Recording
We need to write a test to retrieve a Recording with all the relationships filled in. We will call this method FindByRecordingId, and we will place this method in a class named Catalog. Just as in the previous tests, we need to insert a known recording and its associated entities into the database and then make the call to retrieve the recording and verify whether it is correct. After the tests are done, we then have to delete the known entity. We will use the RecordingBuilder as we did previously to insert or delete a known recording. Here are the tests for the Catalog:
using System; using DataAccessLayer; using NUnit.Framework; [TestFixture] public class CatalogFixture : ConnectionFixture { // member variables ... [SetUp] ...
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.