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