mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-07-02 03:22:57 +00:00
29 lines
858 B
C#
29 lines
858 B
C#
using System;
|
|
using System.Net.Http;
|
|
using CleanArchitecture.IntegrationTests.Infrastructure;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace CleanArchitecture.IntegrationTests.Fixtures;
|
|
|
|
public class TestFixtureBase
|
|
{
|
|
public HttpClient ServerClient { get; }
|
|
protected CleanArchitectureWebApplicationFactory Factory { get; }
|
|
|
|
public TestFixtureBase(bool useTestAuthentication = true)
|
|
{
|
|
Factory = new CleanArchitectureWebApplicationFactory(
|
|
RegisterCustomServicesHandler,
|
|
useTestAuthentication);
|
|
|
|
ServerClient = Factory.CreateClient();
|
|
ServerClient.Timeout = TimeSpan.FromMinutes(5);
|
|
}
|
|
|
|
protected virtual void RegisterCustomServicesHandler(
|
|
IServiceCollection services,
|
|
ServiceProvider serviceProvider,
|
|
IServiceProvider scopedServices)
|
|
{
|
|
}
|
|
} |