Skip to content

Commit c9c0793

Browse files
Simplified test
1 parent b57c28c commit c9c0793

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

dotnet/src/SemanticKernel.UnitTests/AI/ChatCompletion/ChatClientChatCompletionServiceConversionTests.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -671,15 +671,10 @@ public async Task GetStreamingChatMessageContentsAsyncShouldMaintainFunctionCall
671671
var service = chatClient.AsChatCompletionService();
672672

673673
// Act
674-
var results = new List<StreamingChatMessageContent>();
675-
await foreach (var update in service.GetStreamingChatMessageContentsAsync(chatHistory))
676-
{
677-
results.Add(update);
678-
}
674+
await service.GetStreamingChatMessageContentsAsync(chatHistory).ToListAsync();
679675

680676
// Assert
681677
Assert.Collection(chatHistory,
682-
// Function calls
683678
call1 =>
684679
{
685680
Assert.Equal(AuthorRole.Assistant, call1.Role);
@@ -704,7 +699,6 @@ public async Task GetStreamingChatMessageContentsAsyncShouldMaintainFunctionCall
704699
Assert.Equal("call-2", functionCall.Id);
705700
Assert.Equal("Func2", functionCall.FunctionName);
706701
},
707-
// Second function result added to history
708702
result2 =>
709703
{
710704
Assert.Equal(AuthorRole.Tool, result2.Role);

0 commit comments

Comments
 (0)