NUnit 2.2.9 and .NET 2.0 Configuration

  • Thread starter Thread starter Rastko Soskic
  • Start date Start date
R

Rastko Soskic

Hi everyone! :)

I have project containing test cases and I've added
<assemblyname.dll.config> configuration file to [bin\debug] output directory
of project.(That way, NUnit has been working with .net 1.x projects )
However, ConfigurationManager in .net 2.0 doesn't even see configuration
file wherever I put it. What should I do?

Any help is appreciated, and thanks in advance :)

p.s. If it can help, here is sample of code (as simple as possible):
First test case:
[Test]
public void CanRetrieveConnString()
{
connStr = ConfigurationManager.ConnectionStrings["ConnStr"];
Assert.IsNotNull(connStr);
}
and here is part of config file:
<configuration>

<connectionStrings>

<add name="ConnString" connectionString="Value which I can't retrieve from
unit test case :-)" />

</connectionStrings>

</configuration>
 
Back
Top