public void Init() { // give testrunID _testRunID = Guid.NewGuid(); Console.WriteLine("TestRunID: {0}", _testRunID.ToString()); InterceptorCore.Initialize("Write tests, LLBLGenProUnitTest"); }
private void ConfigureLLBLGenPro(IServiceCollection services) { var llblgenProConfig = new LLBLGenProConfiguration(); _configuration.Bind("LLBLGenPro", llblgenProConfig); llblgenProConfig.Sanitize(); var connectionString = _configuration.GetConnectionString("Main.ConnectionString.SQL Server (SqlClient)"); if (!string.IsNullOrEmpty(connectionString) !) { RuntimeConfiguration.AddConnectionString("Main.ConnectionString.SQL Server (SqlClient)", connectionString); } foreach (var kvp in llblgenProConfig.ConnectionStrings) { RuntimeConfiguration.AddConnectionString(kvp.Key, kvp.Value); } var factoryType = typeof(Microsoft.Data.SqlClient.SqlClientFactory); #if DEBUG // only intercept queries using the profiler in debug builds. factoryType = InterceptorCore.Initialize("HnD", factoryType); #endif RuntimeConfiguration.ConfigureDQE <SQLServerDQEConfiguration>(c => { c.AddDbProviderFactory(factoryType) .SetDefaultCompatibilityLevel(llblgenProConfig.SqlServerCompatibilityAsEnum); foreach (var kvp in llblgenProConfig.CatalogNameOverwrites) { c.AddCatalogNameOverwrite(kvp.Key, kvp.Value); } }); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); MapperMaps.Initialize(); #if DEBUG // Don't want to run in production InterceptorCore.Initialize("MvcFramework"); #endif }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); MapperMaps.Initialize(); #if DEBUG // Don't want to run in production InterceptorCore.Initialize("MvcFramework"); #endif // If using CustomMembershipProvider, use property injection and manually trigger injection. //// Because Ninject doesn't create the membership provider, we need to explicitly inject dependencies. //DIFactory.Kernel.Inject(Membership.Provider); }
public void Setup() { InterceptorCore.Initialize("Sqlite Read/Write tests"); }
public static void AssemblyInit(TestContext context) { var configuration = new ConfigurationBuilder().SetBasePath(AppContext.BaseDirectory).AddJsonFile("appsettings.json").Build(); var sqlServerConnectionString = configuration.GetSection("ConnectionStrings")["SqlServerTestDatabase"]; RuntimeConfiguration.AddConnectionString("ConnectionString.SQL Server (SqlClient)", sqlServerConnectionString); // change to TRUE to have ORM Profiler monitoring. Won't work with Connection Sharing. #if FALSE // Wrap the factory with a factory from the ORM Profiler so we get real time information about what's going on // ORM Profiler is a free tool for LLBLGen Pro subscribers. RuntimeConfiguration.ConfigureDQE<SQLServerDQEConfiguration>(c => c.AddDbProviderFactory(InterceptorCore.Initialize("ORM Cookbook", typeof(Microsoft.Data.SqlClient.SqlClientFactory))) .SetDefaultCompatibilityLevel(SqlServerCompatibilityLevel.SqlServer2012)); #else RuntimeConfiguration.ConfigureDQE<SQLServerDQEConfiguration>(c => c.AddDbProviderFactory(typeof(Microsoft.Data.SqlClient.SqlClientFactory)) #endif .SetDefaultCompatibilityLevel(SqlServerCompatibilityLevel.SqlServer2012)); RuntimeConfiguration.Entity.SetMarkSavedEntitiesAsFetched(true); // Setup the dependency injection system to auto-inject e.g. auditors when needed. RuntimeConfiguration.SetDependencyInjectionInfo(new List<Assembly>() { typeof(DepartmentAuditor).Assembly}, null); try { (new Setup()).Warmup(); } catch { } }
public void Setup() { InterceptorCore.Initialize("Massive Oracle read/write tests .NET 4.0"); }
public void Setup() { InterceptorCore.Initialize("Massive SqlServer write tests .NET 4.0"); }
public static void PostStart() { InterceptorCore.Initialize("WebMVC4"); }
public void SetupTests() { InterceptorCore.Initialize("Read tests, AdventureWorks 2008"); }
public void Setup() { InterceptorCore.Initialize("Massive MySql read tests .NET 4.0"); }
public void Setup() { InterceptorCore.Initialize("Massive Postgresql Read/Write tests"); }