fix tests
Some checks failed
SonarQube / Build and analyze (push) Failing after 1m44s
Unit Tests / Run Tests (push) Failing after 1m7s

This commit is contained in:
Leonid Pershin
2025-10-20 10:39:58 +03:00
parent f4892efbb5
commit 1d0ebfeeb7
10 changed files with 73 additions and 74 deletions

View File

@@ -22,31 +22,31 @@ public class IAIServiceTests : UnitTestBase
m.Name == "GenerateChatCompletionAsync"
);
generateChatCompletionMethod.Should().NotBeNull();
generateChatCompletionMethod!.ReturnType.Should().Be(typeof(Task<string>));
generateChatCompletionMethod!.ReturnType.Should().Be<Task<string>>();
generateChatCompletionMethod.GetParameters().Should().HaveCount(2);
generateChatCompletionMethod
.GetParameters()[0]
.ParameterType.Should()
.Be(typeof(List<ChatMessage>));
.Be<List<ChatMessage>>();
generateChatCompletionMethod
.GetParameters()[1]
.ParameterType.Should()
.Be(typeof(CancellationToken));
.Be<CancellationToken>();
var generateChatCompletionWithCompressionMethod = methods.FirstOrDefault(m =>
m.Name == "GenerateChatCompletionWithCompressionAsync"
);
generateChatCompletionWithCompressionMethod.Should().NotBeNull();
generateChatCompletionWithCompressionMethod!.ReturnType.Should().Be(typeof(Task<string>));
generateChatCompletionWithCompressionMethod!.ReturnType.Should().Be<Task<string>>();
generateChatCompletionWithCompressionMethod.GetParameters().Should().HaveCount(2);
generateChatCompletionWithCompressionMethod
.GetParameters()[0]
.ParameterType.Should()
.Be(typeof(List<ChatMessage>));
.Be<List<ChatMessage>>();
generateChatCompletionWithCompressionMethod
.GetParameters()[1]
.ParameterType.Should()
.Be(typeof(CancellationToken));
.Be<CancellationToken>();
}
[Fact]