Description
In the docs it says that Factory.ConfigureWebHost is supposed to run as step 3, then ConfigureTestConfiguration as step 5. However, I'm seeing different behavior; my ConfigureTestConfiguration method is being executed before Factory.ConfigureWebHost, meaning that I'm unable to override the app config.
Expected Behavior
The methods should run in the order the documentation says they do.
Actual Behavior
The methods do not run in the order the documentation says they do.
Steps to Reproduce
public abstract class TestsBase : WebApplicationTest<WebApplicationFactory, Program>
{
protected override void ConfigureTestConfiguration(IConfigurationBuilder config)
{
// Should run as step 5.
}
}
public sealed class WebApplicationFactory : TestWebApplicationFactory<Program>
{
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
// Should run as step 3.
}
}
TUnit Version
1.19.74
.NET Version
10
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
Description
In the docs it says that
Factory.ConfigureWebHostis supposed to run as step 3, thenConfigureTestConfigurationas step 5. However, I'm seeing different behavior; myConfigureTestConfigurationmethod is being executed beforeFactory.ConfigureWebHost, meaning that I'm unable to override the app config.Expected Behavior
The methods should run in the order the documentation says they do.
Actual Behavior
The methods do not run in the order the documentation says they do.
Steps to Reproduce
TUnit Version
1.19.74
.NET Version
10
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
dotnet testordotnet run, not just in my IDE