2 instantiations of DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
1013
AIContent c = new
DerivedAIContent
{ DerivedValue = 42 };
1051
AIContent c = new
DerivedAIContent
();
10 references to DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (10)
Utilities\AIJsonUtilitiesTests.cs (10)
1011
options.AddAIContentType<
DerivedAIContent
>("derivativeContent");
1018
Assert.IsType<
DerivedAIContent
>(deserialized);
1024
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<
DerivedAIContent
>("derivativeContent"));
1048
options.AddAIContentType<
DerivedAIContent
>("text");
1049
options.AddAIContentType<
DerivedAIContent
>("audio");
1059
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType<
DerivedAIContent
>("discriminator"));
1060
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(
DerivedAIContent
), "discriminator"));
1061
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType<
DerivedAIContent
>(null!));
1062
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(
DerivedAIContent
), null!));
1388
[JsonSerializable(typeof(
DerivedAIContent
))]