concept TestInitialize method in category c#
appears as: TestInitialize method

This is an excerpt from Manning's book Code like a Pro in C#.
How would we go about testing adding an object to the database? Sure, we can run the existing test, but that would interact with the database; a giant no-go for a unit test. But we want to verify that the tested method actually added an object to the database, and we do not have the code to route actual HTTP requests to the repository. Here is what I propose: we run the existing success case unit test once, check the database for the newly created entry, and then figure out a solution for the unit test’s connectivity issue.