diff --git a/aspnetcore/test/integration-tests.md b/aspnetcore/test/integration-tests.md index c1d570ebe34a..797bc9a8c099 100644 --- a/aspnetcore/test/integration-tests.md +++ b/aspnetcore/test/integration-tests.md @@ -5,7 +5,7 @@ description: Learn how integration tests ensure that an app's components functio monikerRange: '>= aspnetcore-3.1' ms.author: tdykstra ms.custom: mvc -ms.date: 3/24/2025 +ms.date: 03/10/2026 uid: test/integration-tests zone_pivot_groups: unit-testing-framework --- diff --git a/aspnetcore/test/integration-tests/includes/integration-tests9.md b/aspnetcore/test/integration-tests/includes/integration-tests9.md index c009fa0b2494..7a75aaccca40 100644 --- a/aspnetcore/test/integration-tests/includes/integration-tests9.md +++ b/aspnetcore/test/integration-tests/includes/integration-tests9.md @@ -369,21 +369,21 @@ The test app can mock an { - services.AddAuthentication(defaultScheme: "TestScheme") + services.AddAuthentication(options => + { + options.DefaultAuthenticateScheme = "TestScheme"; + options.DefaultChallengeScheme = "TestScheme"; + }) .AddScheme( "TestScheme", options => { }); }); diff --git a/aspnetcore/test/integration-tests/snippets/nunit/IntegrationTests/AuthTests.cs b/aspnetcore/test/integration-tests/snippets/nunit/IntegrationTests/AuthTests.cs index 6e374e63af14..7ad70a8ea1d3 100644 --- a/aspnetcore/test/integration-tests/snippets/nunit/IntegrationTests/AuthTests.cs +++ b/aspnetcore/test/integration-tests/snippets/nunit/IntegrationTests/AuthTests.cs @@ -110,7 +110,11 @@ public async Task Get_SecurePageIsReturnedForAnAuthenticatedUser() { builder.ConfigureTestServices(services => { - services.AddAuthentication(defaultScheme: "TestScheme") + services.AddAuthentication(options => + { + options.DefaultAuthenticateScheme = "TestScheme"; + options.DefaultChallengeScheme = "TestScheme"; + }) .AddScheme( "TestScheme", options => { }); }); diff --git a/aspnetcore/test/integration-tests/snippets/xunit/IntegrationTests/AuthTests.cs b/aspnetcore/test/integration-tests/snippets/xunit/IntegrationTests/AuthTests.cs index 0c3ae7d3fa4d..f65aa83246fa 100644 --- a/aspnetcore/test/integration-tests/snippets/xunit/IntegrationTests/AuthTests.cs +++ b/aspnetcore/test/integration-tests/snippets/xunit/IntegrationTests/AuthTests.cs @@ -106,7 +106,11 @@ public async Task Get_SecurePageIsReturnedForAnAuthenticatedUser() { builder.ConfigureTestServices(services => { - services.AddAuthentication(defaultScheme: "TestScheme") + services.AddAuthentication(options => + { + options.DefaultAuthenticateScheme = "TestScheme"; + options.DefaultChallengeScheme = "TestScheme"; + }) .AddScheme( "TestScheme", options => { }); });