public IntegracaoTestsFixture() { var clientOptions = new WebApplicationFactoryClientOptions { }; Factory = new AppFactory <TStartup>(); Client = Factory.CreateClient(clientOptions); }
private HttpClient GerarClient() { var clientOptions = new WebApplicationFactoryClientOptions { }; var client = Factory.CreateClient(clientOptions); var token = RecuperarToken(client).Result; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); return(client); }