5 references to SerializeAsync
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAISerializationTests.cs (5)
478
await OpenAISerializationHelpers.
SerializeAsync
(stream, completion);
548
var ex = await Assert.ThrowsAsync<NotSupportedException>(() => OpenAISerializationHelpers.
SerializeAsync
(stream, completion));
638
await Assert.ThrowsAsync<ArgumentNullException>(() => OpenAISerializationHelpers.
SerializeAsync
(null!, new(new ChatMessage())));
639
await Assert.ThrowsAsync<ArgumentNullException>(() => OpenAISerializationHelpers.
SerializeAsync
(new MemoryStream(), null!));
658
await Assert.ThrowsAsync<TaskCanceledException>(() => OpenAISerializationHelpers.
SerializeAsync
(stream, new(new ChatMessage()), cancellationToken: canceledToken));