public static void Main(string[] args) { var config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .Build(); var urls = Environment.GetEnvironmentVariable("ASPNETCORE_URLS").Split(','); KestrelMock.Run(config, urls); }
public void ValidateConfiguration() { try { KestrelMock.Run(new ConfigurationBuilder().Build()); } catch (Exception ex) { Assert.Contains("Configuration must include 'MockSettings' section", ex.Message); } }