I have an nunit test harness in a web service, with a test checking whether a DAL function can (using the Entity Framework) get data from the database.
When I run the unit test with resharper I get an unhandled exception saying "The requested database * is not defined in configuration." The connection string is in the Web.Config, no doubt about it.
This was really annoying me, and I spent far too long trying to fix it when it seemed that all syntax was right, and on a whim tried it in the browser.
It worked. :s
It seems that when running the unit test, the Entity Framework can't read from the Web.Config (using Reflection?).
Is this normal??