static Tests() { var builder = new ConfigurationBuilder(); builder.AddJsonFile("appsettings.json"); var configuration = builder.Build(); _serviceProvider = Cores.BuildServiceProvider(configuration, current => current.AddServices(services => { services.TryAddSingleton(typeof(IConfiguration), x => configuration); services.TryAddSingleton(typeof(ILogger <>), typeof(NullLogger <>)); services.TryAddSingleton(typeof(ILoggerFactory), typeof(NullLoggerFactory)); })); }