public AuthTest( BrowserFixture browserFixture, ToggleExecutionModeServerFixture <Program> serverFixture, ITestOutputHelper output) : base(browserFixture, serverFixture, output) { // Normally, the E2E tests use the Blazor dev server if they are testing // client-side execution. But for the auth tests, we always have to run // in "hosted on ASP.NET Core" mode, because we get the auth state from it. serverFixture.UseAspNetHost(TestServer.Program.BuildWebHost); }
protected AuthTest( BrowserFixture browserFixture, ToggleExecutionModeServerFixture <Program> serverFixture, ITestOutputHelper output, ExecutionMode executionMode) : base(browserFixture, serverFixture, output) { // Normally, the E2E tests use the Blazor dev server if they are testing // client-side execution. But for the auth tests, we always have to run // in "hosted on ASP.NET Core" mode, because we get the auth state from it. switch (executionMode) { case ExecutionMode.Client: serverFixture.UseAspNetHost(TestServer.Program.BuildWebHost <TestServer.AuthenticationStartup>); break; case ExecutionMode.Server: serverFixture.UseAspNetHost(TestServer.Program.BuildWebHost <TestServer.ServerAuthenticationStartup>); break; default: break; } }
public static ToggleExecutionModeServerFixture <T> WithServerExecution <T, TStartup>(this ToggleExecutionModeServerFixture <T> serverFixture) where TStartup : class { serverFixture.UseAspNetHost(Program.BuildWebHost <TStartup>); serverFixture.ExecutionMode = ExecutionMode.Server; return(serverFixture); }
public static ToggleExecutionModeServerFixture <T> WithServerExecution <T>(this ToggleExecutionModeServerFixture <T> serverFixture) { serverFixture.UseAspNetHost(TestServer.Program.BuildWebHost); return(serverFixture); }