protected E2ETestBase(ITestOutputHelper output) { _output = output; var serviceProvider = ConfigureDesignTimeServices( new ServiceCollection() .AddScaffolding() .AddLogging()) .AddSingleton(typeof(IFileService), sp => InMemoryFiles = new InMemoryFileService()).BuildServiceProvider(); _logger = new InMemoryCommandLogger("E2ETest", _output); serviceProvider.GetService <ILoggerFactory>().AddProvider(new TestLoggerProvider(_logger)); Generator = serviceProvider.GetRequiredService <ReverseEngineeringGenerator>(); ScaffoldingModelFactory = serviceProvider.GetRequiredService <IScaffoldingModelFactory>(); }
protected E2ETestBase(ITestOutputHelper output) { _output = output; var serviceProvider = ConfigureDesignTimeServices( new ServiceCollection() .AddScaffolding() .AddLogging()) .AddSingleton(typeof(IFileService), sp => InMemoryFiles = new InMemoryFileService()).BuildServiceProvider(); _logger = new InMemoryCommandLogger("E2ETest", _output); serviceProvider.GetService<ILoggerFactory>().AddProvider(new TestLoggerProvider(_logger)); Generator = serviceProvider.GetRequiredService<ReverseEngineeringGenerator>(); ScaffoldingModelFactory = serviceProvider.GetRequiredService<IScaffoldingModelFactory>(); }