public void ReadConfig_FeatureWithoutHost_IsAddedToDefaultHost() { // Act target.ReadConfig(Directory.GetCurrentDirectory() + "/TestConfigs/testconfig1.json"); // Assert Assert.True(target.featuresRoot.DefaultHost.Features.ContainsKey(FeaturesManager.DEFAULTFEATURE)); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure( IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IApplicationLifetime appLifetime, FeaturesManager featuresManager) { loggerFactory.AddConsole(this.Configuration.GetSection("Logging")); featuresManager.ReadConfig($"{env.ContentRootPath}\\features.json"); // Uncomment these lines if you want to host static files in wwwroot/ // More info: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/middleware // app.UseDefaultFiles(); // app.UseStaticFiles(); app.UseMvc(); app.UseMiddleware <ProxyMiddleware>(); // If you want to dispose of resources that have been resolved in the // application container, register for the "ApplicationStopped" event. appLifetime.ApplicationStopped.Register(() => this.ApplicationContainer.Dispose()); }