8 references to AddAIContentType
Microsoft.Extensions.AI.Abstractions.Tests (8)
Utilities\AIJsonUtilitiesTests.cs (8)
1048
options.
AddAIContentType
<DerivedAIContent>("derivativeContent");
1061
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.
AddAIContentType
<DerivedAIContent>("derivativeContent"));
1077
Assert.Throws<ArgumentException>("contentType", () => options.
AddAIContentType
<AIContent>("discriminator"));
1078
Assert.Throws<ArgumentException>("contentType", () => options.
AddAIContentType
<TextContent>("discriminator"));
1085
options.
AddAIContentType
<DerivedAIContent>("text");
1086
options.
AddAIContentType
<DerivedAIContent>("audio");
1096
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).
AddAIContentType
<DerivedAIContent>("discriminator"));
1098
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.
AddAIContentType
<DerivedAIContent>(null!));