Skip to content

Commit

Permalink
Merge pull request #1281 from solliancenet/cj-fix-tests
Browse files Browse the repository at this point in the history
Fixes a regression resulting from updating HttpClientFactoryService
  • Loading branch information
joelhulen authored Jul 26, 2024
2 parents a0a8004 + 8ce9785 commit baaccd0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ namespace FoundationaLLM.Common.Tests.Services
{
public class HttpClientFactoryServiceTests
{
private readonly IEnumerable<IResourceProviderService> _resourceProviderServices;
private readonly IServiceProvider _serviceProvider;
private readonly IHttpClientFactory _httpClientFactory;
private readonly IConfiguration _configuration;

public HttpClientFactoryServiceTests()
{
_resourceProviderServices = Substitute.For<IEnumerable<IResourceProviderService>>();
_serviceProvider = Substitute.For<IServiceProvider>();
_httpClientFactory = Substitute.For<IHttpClientFactory>();
_configuration = Substitute.For<IConfiguration>();
}
Expand All @@ -36,7 +36,7 @@ public async void CreateClient_WithValidClientName_ReturnsHttpClientWithHeaders(
var httpClient = new HttpClient();
_httpClientFactory.CreateClient(clientName).Returns(httpClient);

var service = new HttpClientFactoryService(_resourceProviderServices, _configuration, _httpClientFactory);
var service = new HttpClientFactoryService(_serviceProvider, _configuration, _httpClientFactory);

// Act
var result = await service.CreateClient(clientName, userContext);
Expand Down

0 comments on commit baaccd0

Please sign in to comment.