8 references to AddAIContentType
Microsoft.Extensions.AI.Abstractions.Tests (8)
Utilities\AIJsonUtilitiesTests.cs (8)
1258Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(int), "discriminator")); 1259Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(object), "discriminator")); 1260Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(ChatMessage), "discriminator")); 1290Assert.Throws<ArgumentNullException>("options", () => ((JsonSerializerOptions)null!).AddAIContentType(typeof(DerivedAIContent), "discriminator")); 1292Assert.Throws<ArgumentNullException>("typeDiscriminatorId", () => options.AddAIContentType(typeof(DerivedAIContent), null!)); 1293Assert.Throws<ArgumentNullException>("contentType", () => options.AddAIContentType(null!, "discriminator")); 1312options.AddAIContentType(typeof(LeafContent), "leaf"); 1364options.AddAIContentType(typeof(DerivedToolCallContent), "derivedToolCall");