Exemple #1
0
        public void HostBuilderConfigureDefaultsInterleavesMissingConfigValues()
        {
            IHostBuilder hostBuilder = new HostBuilder();

            hostBuilder.ConfigureDefaults(args: null);

            using var host = hostBuilder.Build();
            var env = host.Services.GetRequiredService <IHostEnvironment>();

            var expectedContentRootPath = Directory.GetCurrentDirectory();

            Assert.Equal(expectedContentRootPath, env.ContentRootPath);
        }