71 references to Environments
Aspire.Hosting.Testing (1)
Aspire.Hosting.Tests (1)
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (2)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (2)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
Aspire.Oracle.EntityFrameworkCore.Tests (2)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (2)
Microsoft.AspNetCore.Authorization.Test (1)
Microsoft.AspNetCore.Components.Endpoints.Tests (6)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Hosting.Tests (20)
StartupManagerTests.cs (10)
553var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartup), Environments.Development);
569var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartupBaseClass), Environments.Development);
585var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartupEnvironmentBased), Environments.Production);
591Assert.Equal(((MyContainer)app.ApplicationServices).Environment, Environments.Production);
600var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartup), Environments.Development);
611Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, typeof(MyContainerStartupBaseClass), Environments.Development));
621Assert.Throws<InvalidOperationException>(() => StartupLoader.LoadMethods(services, typeof(MyContainerStartupWithOverloads), Environments.Development));
631var startup = StartupLoader.LoadMethods(services, typeof(MyContainerStartup), Environments.Development);
672container.Environment = Environments.Development;
677container.Environment = Environments.Production;
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.Testing (3)
Microsoft.AspNetCore.Tests (16)
Microsoft.Extensions.Hosting (1)
Microsoft.Extensions.Hosting.Abstractions (9)
SampleStartups (1)