Repository: dotnet/aspnetcore
File: src/Hosting/TestHost/src/TestServer.cs (C#)

Code before:
    /// </summary>
    /// <param name="services"></param>
    /// <param name="featureCollection"></param>
    public TestServer(IServiceProvider services, IFeatureCollection featureCollection)
        : this(services, featureCollection, Options.Create(new TestServerOptions()))
    {
        Services = services ?? throw new ArgumentNullException(nameof(services));
        Features = featureCollection ?? throw new ArgumentNullException(nameof(featureCollection));
    }

    /// <summary>
    /// For use with IWebHostBuilder.
    /// </summary>
    /// <param name="builder"></param>
    [Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead.", DiagnosticId = "ASPDEPR008")]
    public TestServer(IWebHostBuilder builder)
        : this(builder, CreateTestFeatureCollection())
    {
    }

    /// <summary>
    /// For use with IWebHostBuilder.
    /// </summary>
    /// <param name="builder"></param>
    /// <param name="featureCollection"></param>
    [Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead.", DiagnosticId = "ASPDEPR008")]
    public TestServer(IWebHostBuilder builder, IFeatureCollection featureCollection)
    {
        ArgumentNullException.ThrowIfNull(builder);

        Features = featureCollection ?? throw new ArgumentNullException(nameof(featureCollection));

        var host = builder.UseServer(this).Build();
        host.StartAsync().GetAwaiter().GetResult();
        _hostInstance = host;

        Services = host.Services;
    }

    /// <summary>
    /// Gets or sets the base address associated with the HttpClient returned by the test server. Defaults to http://localhost/.
    /// </summary>
    public Uri BaseAddress { get; set; } = new Uri("http://localhost/");

    /// <summary>
    /// Gets the <see cref="IWebHost" /> instance associated with the test server.
    /// </summary>
    [Obsolete("IWebHost is obsolete. Use IHost instead.", DiagnosticId = "ASPDEPR008")]
    public IWebHost Host
    {
        get

Review comment (suggestion):
```suggestion
    [Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
```

Code after:
    /// </summary>
    /// <param name="services"></param>
    /// <param name="featureCollection"></param>
    public TestServer(IServiceProvider services, IFeatureCollection featureCollection)
        : this(services, featureCollection, Options.Create(new TestServerOptions()))
    {
        Services = services ?? throw new ArgumentNullException(nameof(services));
        Features = featureCollection ?? throw new ArgumentNullException(nameof(featureCollection));
    }

    /// <summary>
    /// For use with IWebHostBuilder.
    /// </summary>
    /// <param name="builder"></param>
    [Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
    public TestServer(IWebHostBuilder builder)
        : this(builder, CreateTestFeatureCollection())
    {
    }

    /// <summary>
    /// For use with IWebHostBuilder.
    /// </summary>
    /// <param name="builder"></param>
    /// <param name="featureCollection"></param>
    [Obsolete("IWebHost, which this method uses, is obsolete. Use one of the ctors that takes an IServiceProvider instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
    public TestServer(IWebHostBuilder builder, IFeatureCollection featureCollection)
    {
        ArgumentNullException.ThrowIfNull(builder);

        Features = featureCollection ?? throw new ArgumentNullException(nameof(featureCollection));

        var host = builder.UseServer(this).Build();
        host.StartAsync().GetAwaiter().GetResult();
        _hostInstance = host;

        Services = host.Services;
    }

    /// <summary>
    /// Gets or sets the base address associated with the HttpClient returned by the test server. Defaults to http://localhost/.
    /// </summary>
    public Uri BaseAddress { get; set; } = new Uri("http://localhost/");

    /// <summary>
    /// Gets the <see cref="IWebHost" /> instance associated with the test server.
    /// </summary>
    [Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008")]
    public IWebHost Host
    {
        get