33 references to WebApplicationTests
Microsoft.AspNetCore.Tests (33)
WebApplicationTests.cs (33)
36[assembly: HostingStartup(typeof(WebApplicationTests.TestHostingStartup))] 391var envName = $"{nameof(WebApplicationTests)}_ENV"; 393Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.ApplicationKey, nameof(WebApplicationTests))); 411var envName = $"{nameof(WebApplicationTests)}_ENV"; 417{ WebHostDefaults.ApplicationKey, nameof(WebApplicationTests) } 739ApplicationName = nameof(WebApplicationTests), // This is not a real assembly 746Assert.Equal(nameof(WebApplicationTests), webApplication.Environment.ApplicationName); 756ApplicationName = typeof(WebApplicationTests).Assembly.GetName().Name, 771ApplicationName = typeof(WebApplicationTests).Assembly.GetName().Name, 790var envName = $"{nameof(WebApplicationTests)}_ENV"; 796ApplicationName = nameof(WebApplicationTests), 808Assert.Equal(nameof(WebApplicationTests), context.HostingEnvironment.ApplicationName); 814Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 833var envName = $"{nameof(WebApplicationTests)}_ENV"; 845ApplicationName = nameof(WebApplicationTests), 857Assert.Equal(nameof(WebApplicationTests), context.HostingEnvironment.ApplicationName); 863Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 882var envName = $"{nameof(WebApplicationTests)}_ENV"; 890$"--{WebHostDefaults.ApplicationKey}={nameof(WebApplicationTests)}", 903Assert.Equal(nameof(WebApplicationTests), context.HostingEnvironment.ApplicationName); 909Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 961var assemblyName = typeof(WebApplicationTests).Assembly.GetName().Name; 1078var envName = $"{nameof(WebApplicationTests)}_ENV"; 1344builder.Host.Properties["lowercase"] = nameof(WebApplicationTests); 1346Assert.Equal(nameof(WebApplicationTests), builder.Host.Properties["lowercase"]); 1630var logger = app.Services.GetRequiredService<ILogger<WebApplicationTests>>(); 1650var logger = app.Services.GetRequiredService<ILogger<WebApplicationTests>>(); 2098var builder = WebApplication.CreateBuilder(new WebApplicationOptions { ApplicationName = typeof(WebApplicationTests).Assembly.FullName }); 2108var builder = WebApplication.CreateBuilder(new[] { "--applicationName", typeof(WebApplicationTests).Assembly.FullName }); 2120ApplicationName = typeof(WebApplicationTests).Assembly.FullName, 2248var envName = $"{nameof(WebApplicationTests)}_ENV"; 2250builder.Configuration[WebHostDefaults.ApplicationKey] = nameof(WebApplicationTests); 2266Assert.NotEqual(nameof(WebApplicationTests), hostEnv.ApplicationName);