2 instantiations of DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
470
AIContent c = new
DerivedAIContent
{ DerivedValue = 42 };
508
AIContent c = new
DerivedAIContent
();
10 references to DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (10)
Utilities\AIJsonUtilitiesTests.cs (10)
468
options.AddAIContentType<
DerivedAIContent
>("derivativeContent");
475
Assert.IsType<
DerivedAIContent
>(deserialized);
481
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<
DerivedAIContent
>("derivativeContent"));
505
options.AddAIContentType<
DerivedAIContent
>("text");
506
options.AddAIContentType<
DerivedAIContent
>("audio");
516
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType<
DerivedAIContent
>("discriminator"));
517
Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(
DerivedAIContent
), "discriminator"));
518
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType<
DerivedAIContent
>(null!));
519
Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(
DerivedAIContent
), null!));
799
[JsonSerializable(typeof(
DerivedAIContent
))]