views:

4

answers:

0

I have my application broken into the following projects/assemblies

  • Approot/UI
  • AppDomain/business logic/layer
    • Domain.Tests
  • Persistance/db layer
    • Persistance.Tests

I'm integration testing the connection string stored in the Persistance assembly using MSTest. currently I am using LocalTestRun.config for the solution to tell it to include the Persistance layer's app.config file for testing, but I imagine this will not work well if any other layers have an app.config file in their test sections. How is this supposed to be set up? ConfigurationManager.GetSection(assemblyName?).

What does adding [DeploymentItem("app.config")] do for the test method?

    [TestMethod]
    [DeploymentItem("app.config")] // I added this to see if it would help somehow
    public void Configuration_ConnectionStrings_Connect()
    {
    //code omitted
    }