2024-11-21 14:50:36 +05:00
|
|
|
|
namespace Persistence.IntegrationTests
|
|
|
|
|
{
|
2024-11-25 14:29:42 +05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Фабрика HTTP клиентов для интеграционных тестов
|
|
|
|
|
/// </summary>
|
2024-11-21 14:50:36 +05:00
|
|
|
|
public class TestHttpClientFactory : IHttpClientFactory
|
|
|
|
|
{
|
|
|
|
|
private readonly WebAppFactoryFixture factory;
|
|
|
|
|
|
|
|
|
|
public TestHttpClientFactory(WebAppFactoryFixture factory)
|
|
|
|
|
{
|
|
|
|
|
this.factory = factory;
|
|
|
|
|
}
|
|
|
|
|
public HttpClient CreateClient(string name)
|
|
|
|
|
{
|
|
|
|
|
return factory.CreateClient();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|