views:

494

answers:

1

I am testing some business object's Save() method. In order to save object, I need to read connection string from Configuration Manager. But all I get is null value. My settings are in web site web.config. How can I obtain during test runtime. Do I need additional configuration.

+4  A: 

The unit test project has to have it's own config file. Add one to the project and place the connection string settings you need in it.

Chris Lively
Thanks, I forgot to add that file :)
nemke