# Testing Testing - where is my database?

Publish date: 10 Jun 2016
Tags: software

Recently while creating a unit test (MSTest VS2015) to test my repository pattern, I hit a snag. Despite having defined the database in my app.config of the Test project, I could not locate my newly created database.

Turns out I needed to initialise my db in the test class , like so:

<pre class="wp-code-highlight prettyprint linenums:1">// Declare this property - this is set by MSTest
public TestContext TestContext { get; set; }

// In test initialization
[ClassInitialize]
public static void SetUp(TestContext context)
{