8 references to AddAIContentType
Microsoft.Extensions.AI.Abstractions.Tests (8)
Utilities\AIJsonUtilitiesTests.cs (8)
984
options.
AddAIContentType
<DerivedAIContent>("derivativeContent");
997
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.
AddAIContentType
<DerivedAIContent>("derivativeContent"));
1013
Assert.Throws<ArgumentException>(() => options.
AddAIContentType
<AIContent>("discriminator"));
1014
Assert.Throws<ArgumentException>(() => options.
AddAIContentType
<TextContent>("discriminator"));
1021
options.
AddAIContentType
<DerivedAIContent>("text");
1022
options.
AddAIContentType
<DerivedAIContent>("audio");
1032
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).
AddAIContentType
<DerivedAIContent>("discriminator"));
1034
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.
AddAIContentType
<DerivedAIContent>(null!));