2 instantiations of DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (2)
Utilities\AIJsonUtilitiesTests.cs (2)
324
AIContent c = new
DerivedAIContent
{ DerivedValue = 42 };
362
AIContent c = new
DerivedAIContent
();
9 references to DerivedAIContent
Microsoft.Extensions.AI.Abstractions.Tests (9)
Utilities\AIJsonUtilitiesTests.cs (9)
322
options.AddAIContentType<
DerivedAIContent
>("derivativeContent");
329
Assert.IsType<
DerivedAIContent
>(deserialized);
335
Assert.Throws<InvalidOperationException>(() => AIJsonUtilities.DefaultOptions.AddAIContentType<
DerivedAIContent
>("derivativeContent"));
359
options.AddAIContentType<
DerivedAIContent
>("text");
360
options.AddAIContentType<
DerivedAIContent
>("audio");
370
Assert.Throws<ArgumentNullException>(() => ((JsonSerializerOptions)null!).AddAIContentType<
DerivedAIContent
>("discriminator"));
371
Assert.Throws<ArgumentNullException>(() => ((JsonSerializerOptions)null!).AddAIContentType(typeof(
DerivedAIContent
), "discriminator"));
372
Assert.Throws<ArgumentNullException>(() => options.AddAIContentType<
DerivedAIContent
>(null!));
373
Assert.Throws<ArgumentNullException>(() => options.AddAIContentType(typeof(
DerivedAIContent
), null!));