public Action <IApplicationBuilder> Configure(Action <IApplicationBuilder> next) { return(app => { _runner.Configure(app, _configuration, _hostingEnvironment); _runner.RunApplicationInitializers(app.ApplicationServices).GetAwaiter().GetResult(); next(app); }); }
public void Configures() { // Arrange var options = new StartupModulesOptions(); var startupModule = new MyStartupModule(); options.AddStartupModule(startupModule); var runner = new StartupModuleRunner(options); // Act runner.Configure(new ApplicationBuilder(new ServiceCollection().BuildServiceProvider()), null, null); // Assert Assert.True(startupModule.Configured); }