Does anyone know how to mock up an ErpContext object in C#? I’m trying to setup tests on my custom methods used in Epicor configurators & doc rules.
I’ve tried setting my connection string inside my config, but it doesn’t seem to like it.
Connection String in config:
<add name=“ErpContext” connectionString=“data source={EpicorServer};initial catalog=DevEnvironment;integrated security=True;” providerName=“System.Data.EntityClient” />
ErpContext I’m trying to instantiate:
ErpContext context = new ErpContext(System.Configuration.ConfigurationManager.ConnectionStrings[“ErpContext”].ConnectionString);
Is there a specific format to the connection string for the ErpContext to work?