Database Catalog Service

In the previous section, we could isolate the tests and implementation from the database, which means that if we have a failing database test, it will not cascade into the tests for the RecordingAssembler. Now that we know that the code works in isolation, we need to hook up the code to the database so we can verify that the code on the server works correctly without the Web service. The first test is the CheckId test:

[TestFixture] public class DatabaseCatalogServiceFixture : RecordingFixture { private DatabaseCatalogService service; private RecordingDto dto; [SetUp] public new void SetUp() { base.SetUp(); service = new DatabaseCatalogService(); dto = service.FindByRecordingId(Recording.Id); } [Test] public void CheckId() ...

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.