Open fallwest opened 8 years ago
Update:
Got this to work with by adding the following class to my test project:
using System.ComponentModel.Composition;
using Simple.Data.Ado;
using Simple.Data.SqlServer;
namespace Blabla.AppServer.Integration.Tests
{
/// <summary>
/// Noe spesiell dritt som trengs fordi Simple.Data bruker reflection og MEF som gjør at enhetstester feiler bare på byggserver
/// </summary>
// ReSharper disable once RedundantExtendsListEntry
[Export(typeof(IConnectionProvider))]
[Export("System.Data.SqlClient", typeof(IConnectionProvider))]
// ReSharper disable once RedundantExtendsListEntry
public class ConnectionProvider : SqlConnectionProvider, IConnectionProvider
{
}
}
I have to fight with MEF on my sever run of unit / integration tests. I have got past not finding the Ado provider with the code sample below but then run up against "SimpleDataException:
Would rather have feature that allows me to circumvent MEF for testing.
I have, of course, added all nuget packages to the test project.