using ExampleSignalR.Test.Services; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; namespace ExampleSignalR.Test; public class WebAppFactoryFixture : WebApplicationFactory { protected override void ConfigureWebHost(IWebHostBuilder builder) { builder.ConfigureServices(ConfigureServices); } private void ConfigureServices(IServiceCollection services) { services.RemoveAll(typeof(IMessageService)); services.AddTransient(); } }