2 instantiations of DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
1048
AIContent c = new
DerivedAIContent
{ DerivedValue = 42 };
1089
AIContent c = new
DerivedAIContent
();
10 references to DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (10)
Utilities\AIJsonUtilitiesTests.cs (10)
1046
options.AddAIContentType<
DerivedAIContent
>("derivativeContent");
1053
Assert.IsType<
DerivedAIContent
>(deserialized);
1059
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<
DerivedAIContent
>("derivativeContent"));
1086
options.AddAIContentType<
DerivedAIContent
>("text");
1087
options.AddAIContentType<
DerivedAIContent
>("audio");
1097
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType<
DerivedAIContent
>("discriminator"));
1098
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(
DerivedAIContent
), "discriminator"));
1099
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType<
DerivedAIContent
>(null!));
1100
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(
DerivedAIContent
), null!));
1426
[JsonSerializable(typeof(
DerivedAIContent
))]