I'm currently trying to unit test a context class of the Entity Framework with the "Effort" framework (http://effort.codeplex.com/wikipage?title=Tutorials&referringTitle=Home)
If my unit test project has two classes that contain methods use effort then i get the following error:
Argument 'xmlReader' is not valid. A minimum of one .ssdl artifact must be supplied.
It appears to be that having the than one method using effort across more than one class causes the error. I rather not have all my unit test functions in one class.
Code the test is running:
IDataLoader loader = new Effort.DataLoaders.CsvDataLoader(Path.Combine(TestContext.DeploymentDirectory, "csvFiles"));
using (EntityConnection connection = Effort.EntityConnectionFactory.CreateTransient("name=Entities", loader))
{
BussinnesLayer.Customer[] customers = Customer.GetCustomers(connection);
Assert.IsTrue(customers.Length > 0, "Customer list length = 0");
}
App.Config contains the following for the entity connection string: (removed sensitive data)
<add name="Entities" connectionString="metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/Model.msl;provider=System.Data.SqlClient;provider connection string="data source=servername;initial catalog=database;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
Any help would be appreciated.