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

  • Thread starter Thread starter Richard Lewis Haggard
  • Start date 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?
 
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>
 
Back
Top