Exemple #1
0
        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);
        }
Exemple #2
0
 public void ValidateConfiguration()
 {
     try
     {
         KestrelMock.Run(new ConfigurationBuilder().Build());
     }
     catch (Exception ex)
     {
         Assert.Contains("Configuration must include 'MockSettings' section", ex.Message);
     }
 }