Skip to content

Commit

Permalink
Fix compile/build issues in Core.Tests project
Browse files Browse the repository at this point in the history
  • Loading branch information
alistar-andrei committed Aug 7, 2024
1 parent e804329 commit 0779492
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/dotnet/Core.Tests/Services/GatekeeperAPIServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ public class GatekeeperAPIServiceTests
private readonly string _instanceId = "00000000-0000-0000-0000-000000000000";
private readonly GatekeeperAPIService _testedService;

private readonly ICallContext _callContext = Substitute.For<ICallContext>();
private readonly IHttpClientFactoryService _httpClientFactoryService = Substitute.For<IHttpClientFactoryService>();

public GatekeeperAPIServiceTests()
{
_testedService = new GatekeeperAPIService(_httpClientFactoryService);
_testedService = new GatekeeperAPIService(_callContext, _httpClientFactoryService);
}

#region GetCompletion
Expand All @@ -35,7 +36,7 @@ public async Task GetCompletion_SuccessfulCompletionResponse()
{
BaseAddress = new Uri("http://nsubstitute.io")
};
_httpClientFactoryService.CreateClient(Arg.Any<string>()).Returns(httpClient);
_httpClientFactoryService.CreateClient(Arg.Any<string>(), _callContext.CurrentUserIdentity).Returns(httpClient);

// Act
var actual = await _testedService.GetCompletion(_instanceId, completionRequest);
Expand All @@ -58,7 +59,7 @@ public async Task GetCompletion_UnsuccessfulDefaultResponse()
{
BaseAddress = new Uri("http://nsubstitute.io")
};
_httpClientFactoryService.CreateClient(Arg.Any<string>()).Returns(httpClient);
_httpClientFactoryService.CreateClient(Arg.Any<string>(), _callContext.CurrentUserIdentity).Returns(httpClient);

// Act
var actual = await _testedService.GetCompletion(_instanceId, completionRequest);
Expand Down

0 comments on commit 0779492

Please sign in to comment.