19 lines
399 B
C#
19 lines
399 B
C#
using System.Net.Http;
|
|
|
|
namespace GameList.Tests.Support;
|
|
|
|
internal class StubHttpClientFactory : IHttpClientFactory
|
|
{
|
|
private readonly StubHttpMessageHandler _handler;
|
|
|
|
public StubHttpClientFactory(StubHttpMessageHandler handler)
|
|
{
|
|
_handler = handler;
|
|
}
|
|
|
|
public HttpClient CreateClient(string name)
|
|
{
|
|
return new HttpClient(_handler, dispose: false);
|
|
}
|
|
}
|