Add backend test harness with mock SQLite
This commit is contained in:
18
GameList.Tests/Support/StubHttpClientFactory.cs
Normal file
18
GameList.Tests/Support/StubHttpClientFactory.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user