How to make a unit test for a method dependent upon app.config values?

  • Thread starter Richard Lewis Haggard
  • Start date
R

Richard Lewis Haggard

It appears that unit tests created to exercise methods that read information
from the application's app.config file have a problem in that these methods
do not have access to the app.config file while the test is being executed.
Does anyone know how to get around this?
 
R

Richard Lewis Haggard

Doh!

Here's the problem - test needs an app.config file. Here's the answer. Add
an app.config to the project.

<sound of hand smacking into forehead. Repeat as many times as it takes>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top