title: Cannot Use ConfigurationManager inside Unit Test Project
body: <p>I'm trying to write a unit test for my project, but it will not let me use the Configuration Manager. Right now my project is set up like</p>
  
  <p>ASP.Net application (all aspx pages)</p>
  
  <p>ProjectCore (all C# files - model)</p>
  
  <p>ProjectTest (all tests)</p>
  
  <p>in my ProjectCore, I am able to access the ConfigurationManager object from System.Configuration and pass information onto the project. However, when I ran a test where the ConfigurationManager is involved, I get the error </p>
  
  <pre><code>System.NullReferenceException: Object reference not set to an instance of an object.
  </code></pre>
  
  <p>Here is an example of the test</p>
  
  <pre><code>using System.Configuration;
  
  [TestMethod]
  public void TestDatabaseExists()
  {
      //Error when I declare ConfigurationManager
      Assert.IsNotNull(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString
  }
  </code></pre>
  
  <p>in my other tests, ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString is what I set my data adapter's configuration string to, and returns a null error on the tests but not when I actually use the website. Any ideas?</p>