added API tests

This commit is contained in:
Claudiu Farcas
2022-10-13 08:51:43 +03:00
parent 924fc4e065
commit 2178d0fabd
2 changed files with 56 additions and 1 deletions
@@ -26,11 +26,16 @@ namespace PracticeCalendar.UnitTests.Integration
{
cfg.AddSingleton(svc => domainEventServiceMock.Object);
});
_scopeFactory = _factory.Services.GetRequiredService<IServiceScopeFactory>();
_configuration = _factory.Services.GetRequiredService<IConfiguration>();
}
public static HttpClient GetHttpClient()
{
return _factory.CreateClient();
}
public static async Task<TResponse> SendAsync<TResponse>(IRequest<TResponse> request)
{
using var scope = _scopeFactory.CreateScope();