I have a class library in which I used entity framework
I added a unit test project to test the DAL dll :
[TestMethod]
public void TestConnection()
{
try
{
ICrud<ajt_demande> dem = new Crud<ajt_demande>();
List<ajt_demande> lst = (List<ajt_demande>)dem.GetAll();
Console.WriteLine(lst.Count);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
throw new AssertFailedException();
}
}
I get an exception indicates that the connection string is not found !!!
I need to know :
- What is the reason of this exception?
- What is the smarter way to fix this?
Aucun commentaire:
Enregistrer un commentaire