using DD.Persistence.Client.Helpers; using Microsoft.Extensions.Configuration; namespace DD.Persistence.IntegrationTests { /// /// Фабрика HTTP клиентов для интеграционных тестов /// public class TestHttpClientFactory : IHttpClientFactory { private readonly WebAppFactoryFixture factory; private readonly IConfiguration configuration; public TestHttpClientFactory(WebAppFactoryFixture factory, IConfiguration configuration) { this.factory = factory; this.configuration = configuration; } public HttpClient CreateClient(string name) { var client = factory.CreateClient(); client.Authorize(configuration); return client; } } }