6 references to AddAIContentType
Microsoft.Extensions.AI.Abstractions.Tests (6)
Utilities\AIJsonUtilitiesTests.cs (6)
324
Assert.Throws<ArgumentException>(() => options.
AddAIContentType
(typeof(int), "discriminator"));
325
Assert.Throws<ArgumentException>(() => options.
AddAIContentType
(typeof(object), "discriminator"));
326
Assert.Throws<ArgumentException>(() => options.
AddAIContentType
(typeof(ChatMessage), "discriminator"));
353
Assert.Throws<ArgumentNullException>(() => ((JsonSerializerOptions)null!).
AddAIContentType
(typeof(DerivedAIContent), "discriminator"));
355
Assert.Throws<ArgumentNullException>(() => options.
AddAIContentType
(typeof(DerivedAIContent), null!));
356
Assert.Throws<ArgumentNullException>(() => options.
AddAIContentType
(null!, "discriminator"));