Hello, In a Unit test with visual studio 2005
I have this code in the test assembly:
1.System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(Configur ationUserLevel.None);
2.ConnectionStringsSection csSection = config.ConnectionStrings;
3.ConnectionStringSettings cs =
csSection.ConnectionStrings[GABTSAUDITORIA_CONEXION];
4.ConnectionString = cs.ToString();
5.ConnectionString =
ConfigurationManager.ConnectionStrings[GABTSAUDITORIA_CONEXION].ConnectionString;
I have that write the file of configuration of this way:
[ClassInitialize()]
public static void InicializacionPruebas(TestContext testContext)
{
if (!File.Exists("vstesthost.exe.config"))
{
File.Copy(FICHERO_CONFIGURACION, "vstesthost.exe.config");
}
But if the assembly not contain the lines 1,2,3,4 then Where and How I have
to write the file of configuration?
Thanks